Lesson 3 Modifying HTML Elements


#1

It says my code is correct but when I try to test it in the window nothing happens. My code is below - what am I missing? Thanks!

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

Hi Kelsea,

You haven't closed your $(document).on(...); piece of code properly. Before the closing parenthesis ()) on the next to last line, add a closing curly brace (}), so that the line looks like this:

});

#3

Thank you!! That fixed it!