Remove what has been checked redux


#1


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


From what I can see it should all work just fine, however when I click on items in the list they do not get removed. The add part works just fine.


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


#2

here:

$('.list').append('<div class = "#item"> ' + toAdd + '</div>');

you gave your div a class of #item, why include a # in the class name?


#3

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