Append to Body


#1


HELP! The results on the right shows that it works but I still get the error message.


Oops, try again. It looks like you're not appending a "

" + toAdd + "
" to .list. Check the example in the instructions if you need help.


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


#2

Instruction:

Go ahead and .append() a <div> with class="item" to the .list div of your HTML document.

so you have to append div element with class="item" to the .list div .and Inside .item div you should have the toAdd variable.


#3

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.