Remove what's been clicked


#1


Exercise Link


I've read many posts about this exercise but I checked and compared many times my code with the corrected ones from the posts, and I can't seem to find the mistake.

Error message: "Uncaught SyntaxError: missing ) after argument list"
Despite the error, the lesson shows I've completed it, so I don't know what's going on...


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

Missing the closing bracket ) here

Like so: $('input[name=checkListItem]').val();


#3

Wow! Thank you so much!
I really missed that one, I guess I should take naps between so many hours of excercises.:disappointed_relieved:


#4

You're Welcome :green_heart:

I take snack breaks :slight_smile:


#5