.parent().remove() issue

Try:

$(document).on('click', '.remove', function() {
    $(this).parent().remove();
});

Events are bound on page load so newly added element aren't.


Make sure you close your expresion:

$(".remove").click(function() {
    $(this).parent().remove();
});

The 'live' function call has been deprecated and no longer works. You can find instructions for how to rewrite functions using the replacement 'on()' method here and more info about the deprecation:

http://api.jquery.com/live/

To handle all current and newly created elements, you must now use:

$(document).on("click", ".remove", function() {
    $(this).parent().remove();
});

jQuery runs on the document object, not the element and there is an additional parameter to specify which elements to watch and add event listeners to.