I am using the following script to fade an image out after 5 seconds:
var $j = jQuery.noConflict();
$j(document).ready(function() {
var fade_out = function() {
$j("#fadeout").fadeOut().empty();
}
setTimeout(fade_out, 5000);
});
When the image goes away it just disappears. I want the image to slowly fade out over a second or so. How can I do this?
Put the empty method in the fadeOut callback: