Hide a message after 5000 milliseconds with jquery
I want if a message(div class="message"
) there is (mean was display: block;
) after 5000 milliseconds it is hide(display: none;
). ho开发者_运维百科w is it?
Example: http://jsfiddle.net/SLRFt/1/
<div class="message">This is a message</div>
setTimeout(function(){ $('.message').fadeOut('slow'); }, 5000);
$('.message').delay(5000).fadeOut('slow');
http://jsfiddle.net/xavi3r/SLRFt/3/
精彩评论