I finshed this section but my code seems to do nothing, some help please :-)


#1

Hi I this the modifying HTML Elements section but my code does nothing. Can someone help us out please?

$(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

First, the #list is not a id, it's a class, so it should be .list

Second, you should not add a # on a class="" property.


#3

Thank you. this sorted it.