Remove What's been Clicked - Bug


The exercise is: "Remove What's Been Clicked" :

I believe there is a bug - the following code registers as correct when I Save and Submit, but I cannot execute a removal of an item in the live demo window.

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

    $(this).on('click', '.item', .remove());


This is what the page looks like when (i believe) it is erring:

Thank you for taking a look - please let me know how my code is wrong if this is not really a bug.


We need a binding to the document or .list, then delegate the event.

    $('.list').on('click', '.item', function() {


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