I would like to fadeOut() an image on the page and remove it from the DOM after the animation is finished. Sounds easy enough?
Example code (image has the id "img1"):
$("#img1").fadeOut("slow", function() { $(this).remove() });
This does does not work. When I inspect the page with Firebug the image is still there. It is just hidden.
Second example which should kind of flash the image:
$("#img1").fadeOut("slow", function() { $(this).fadeIn() });
Strange.