I would like to flash a success message on my page.
I am using the jQuery fadeOut method to fade and then remove the element. I can increase the duratio
dansays's answer just doesn't work for me. For some reason, remove() runs immediately and the div disappears before any animations happen.
The following works, however (by omitting the remove() method):
$('#foo').fadeIn(500).delay(5000).fadeOut(500);
I don't mind if there are hidden DIVs on the page (there shouldn't be more than a few anyway).