12. Append to Body



Codecademy says that I have passed the exercise. However, when I enter an item into the box and click the button, it returns "[object Object]" instead of what I entered for some reason.

        var toAdd=$('input[name=checkListItem]');
        $('.list').append('<div class="item">' + toAdd + '</div>');



var toAdd=$('input[name=checkListItem]');

you need to retrieve the value from the input using val()


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