13/14 Remove What's Been Clicked


#1

I followed the instructions. What is wrong with the code?

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

' + toAdd + '
');
});
$(document).on('click','.item', function(){
$(this).remove;
});
});

#2

Nevermind I got it, I forgot to add the () after $(this).remove; so it looks like

$(document).on('click','.item', function(){
$(this).remove();
});