13. Remove What's Been Clicked


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

error: Uncaught SyntaxError: missing ) after argument list
I can't seem to find the error. My button doesn't work propperly.

Thanks in forehand


#2

The plus sign is missing

change:
$(".list").append("<div class='item'>" + toAdd "</div>");

into:
$(".list").append('<div class="item">' + toAdd + '</div>');