how to manipulate input element and more

by Akram kamal

HTML

<div id="one">
    <label>
        <input type="checkbox" name="first" value="Jide" />Jake</label>
    <label>
        <input type="checkbox" name="first" value="Tom" />Sam</label>
    <label>
        <input type="checkbox" name="first" value="Fem" />Mary</label>
    <label>
        <input type="checkbox" name="first" value="Weng" />Petunia</label>
</div>
<div id="two">
    <ul></ul>
</div>

JavaScript

$("[name='first']").change(function () {
    var lis = ""

    $("[name='first']:checked").each(function () {
        lis += "<li>" + $(this).parent().text() + "</li>"
        console.log(this)
    })
    console.log(lis)
    $("#two ul").html(lis)
})