14.YOU DID IT. Yes i did it but


Here is my code, all the steps seems right and i can pass the lessons:

(document).ready(function() { ("#button").click(function() { var toAdd = (“input[name=checkListItem]”).val();

" + toAdd + “
(document).on("click",".item", function() { (this).remove();

Why if my code work i cant click the Add button and cant add any information ?
I checked before other topics and the codes seems equal to mine.


Hi david,

Compare how you’re selecting #button and .list, to how you’re selecting document or this. You’re missing the dollar sign ($) in front of some of your selectors, which is why it’s not working.


Thanks zystvan, but still doesn’t work, here is the new code:

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


@jamona The problem is on this line:

The quotes surrounding item are un-quoting it and causing a syntax error. You can either escape the quotes by adding a backslash (\) in front of each quote you don’t want registered, or you can use single quotes around everything else :slight_smile:



" + toAdd + “
ty zystvan, that was the problem, resolved , you are a young master :wink: