I want to delete an DOM element right after fading out. What I did so far is
$(element).click(function() { $(this).fadeOut(500, function() { $().remove(this)
or $.remove($(this));
why messing here just use $('#anydiv').remove();
You're using the remove() function wrongly.
$(element).click(function() { $(this).fadeOut(500, function() { $(this).remove(); }); });