admin管理员组文章数量:1302428
I want if a message(div class="message"
) there is (mean was display: block;
) after 5000 milliseconds it is hide(display: none;
). how is it?
Example: /
<div class="message">This is a message</div>
setTimeout(function(){ $('.message').fadeOut('slow'); }, 5000);
I want if a message(div class="message"
) there is (mean was display: block;
) after 5000 milliseconds it is hide(display: none;
). how is it?
Example: http://jsfiddle/SLRFt/1/
<div class="message">This is a message</div>
setTimeout(function(){ $('.message').fadeOut('slow'); }, 5000);
Share
edited Oct 5, 2011 at 9:15
Jennifer Anthony
asked Oct 5, 2011 at 8:56
Jennifer AnthonyJennifer Anthony
2,27710 gold badges38 silver badges56 bronze badges
6
- 1 5000 seconds = about 1.5 hours. Did you mean 5000 microseconds? – IvanGL Commented Oct 5, 2011 at 8:58
- please rephrase your question because it is very unclear what you are asking actually. – Sander Commented Oct 5, 2011 at 9:10
- @IvanGL: 5000 microseconds = 0.005 seconds. – Dennis Commented Oct 5, 2011 at 9:12
- oh yes, i mean is microseconds. – Jennifer Anthony Commented Oct 5, 2011 at 9:14
- @Dennis: I know, but in original question there was 5000 seconds. – IvanGL Commented Oct 8, 2011 at 6:34
1 Answer
Reset to default 12$('.message').delay(5000).fadeOut('slow');
http://jsfiddle/xavi3r/SLRFt/3/
本文标签: javascriptHide a message after 5000 milliseconds with jqueryStack Overflow
版权声明:本文标题:javascript - Hide a message after 5000 milliseconds with jquery - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1741689021a2392611.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论