show div for a set time, then hide it
Posted
by
Patrick
on Stack Overflow
See other posts from Stack Overflow
or by Patrick
Published on 2009-12-09T10:07:59Z
Indexed on
2010/12/26
3:54 UTC
Read the original article
Hit count: 170
JavaScript
|jQuery
Im using jquery for various things on my site, but one thing im not sure how to do, is have it show an element, then wait X seconds, and hide the element.
$('#form').ajaxForm(function() {
$('#cartcontents').fadeOut("fast").load('cart.php').fadeIn("fast");
});
That's the JavaScript that I'm using now. How could I have it (when the form submits) display the div #notice
for 5 seconds, then fadeOut
?
© Stack Overflow or respective owner