It wouldn't let me move forward:


#1

Apparently Codecademy doesn't recognizes this is the same thing. It wouldn't let me move forward:

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

12. Append to body-- code apparently not working but accepted anyway
#2

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

If taken literally, this would mean not creating a variable, but appending the HTML directly. The SCT is not exhaustive, and in this case is probably not looking for the output, as much as the code pattern.

$('.list').append('<div ...');

We need to work within the range of limited expectations for best results.


#3

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