Code isn't working but is accepted anyways


Here is the code i used, it was accepted by the tutorial but nothing happens when i click

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

It says missing ) after argument list.


Hi Meghal,

Thanks for reporting this!
In case you didn't figure it out, you need to add a }); on the next to last line :)



I'm in the same case : succeeded every step but the append is not showing.
Sorry but I don't understand your answer "you need to add a }); on the next to last line"

Where is it missing ?

My code

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



HI @mitsudomoe,

You need to use single quotes (') around the HTML, and double quotes (") inside the HTML (for class="") on line 10.

Next time, or if you still need help, please create a new topic.