Return to Snippet

Revision: 28557
at July 9, 2010 20:40 by math89


Initial Code
//Here's how we used to do it in 1.3.2 using setTimeout

    setTimeout(function() {
  $('.mydiv').hide('blind', {}, 500)
}, 5000);



//And here's how you can do it with 1.4 using the delay() feature (this is a lot like sleep)

$(".mydiv").delay(5000).hide('blind', {}, 500);

Initial URL
http://codesnippets.info/jquery/automatically-hide-or-close-elements-after-an-amount-of-time/

Initial Description
Automatically hide or close elements after an amount of time (jQuery)

Initial Title
Automatically hide or close elements after an amount of time (jQuery)

Initial Tags

                                

Initial Language
jQuery