12. Append to Body


#1

$(document).ready(function() {
    $('#button').click(function() {
        var toAdd = $(input[name=checkListItem]').val();
        $(".list").append('<div class="item">'  +  toAdd  +  '</div>');
    })
})

This is code is right, but:

Uncaught SyntaxError: Invalid or unexpected token


#2

$('...')


#4

Thank you! I be careless


#5

A post was split to a new topic: The code works , but I can't go to the next lesson


#6