Completely confused


#1

How do I solve this as i have no clue.

https://www.codecademy.com/courses/web-beginner-en-v6phg/2/3?curriculum_id=50a3fad8c7a770b5fd0007a1#

Here is my code:


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




#2

The selector should be $('.list').

The appended content will be a DIV with toAdd as the content.

'<div class="item">' + toAdd + '</div>'

#3

Thank you! Appreciate the help!


#4

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