14. You Did It! - won't remove list items



Everything works great, I just can't remove anything I add. Here's my code:

$(document).ready(function() {
    $('#button').click(function() {
        var toAdd = $('input[name=checkListItem]').val();
        $('.list').append('<div class="item">' + toAdd + '</div>'         );
    $(document).on('click', 'item', function() {

Thanks for your help.


Hi Travis,

Try comparing your selector for list items to what the instructions say :slight_smile:

Hint (click to view)

You have item on line 6, but that selects the (nonexistent) HTML element <item>. You need to select .item, which selects any element with the class="item" attribute :slight_smile:


Aha! Thank you very much sir!


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