When a page loads, a div
should appear for like 3 seconds and then automatically disappear. I'm having trouble with the code at the moment. I'm using this code below:
jQuery("#infor").delay(6000).fadeOut("slow");
My HTML is:
<div id="infor">
something
</div>
But it doesn't seem to be working. Does anyone have any idea why this code is not working?
Is your code within a document.ready
block?
$( document ).ready(function() {
$("#infor").delay(3000).fadeOut("slow");
});
It works for me: http://jsfiddle.net/YdU4z/