开发者

Hide a message after 5000 milliseconds with jquery

开发者 https://www.devze.com 2023-04-10 14:52 出处:网络
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?

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/

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号