Removing elements in todo list


Uncaught ReferenceError: remove is not defined

         var toAdd=$('input[name=checkListItem]').val();
         $(".list").append('<div class="item">'+ toAdd+ '</div>');


look at .on() documentation:

the the third argument should be a function, here is an example from the docs:

$( "#dataTable tbody" ).on( "click", "tr", function() {
  console.log( $( this ).text() );

inside the function you can then remove the element


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