/ Published in: jQuery

Automatically hide or close elements after an amount of time (jQuery)
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
//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);
URL: http://codesnippets.info/jquery/automatically-hide-or-close-elements-after-an-amount-of-time/
Comments
