13 of 14 Remove What's Been Clicked


When I click Save & Submit, it goes thru' but I see the syntax error. I looked thru' diligently, can't see the syntax error.
Thanks in advance!

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

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


$(document).on('click', '.item',.remove() {



$(document).on('click', '.item',.remove() {

you syntax should be like

$(document).on('event', 'selector', function() {
    Do something!

so you need a handler to do something. your .remove() method should be inside function.


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