延迟JQuery效果 [英] delay JQuery effects
本文介绍了延迟JQuery效果的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我希望在延迟几秒后淡出一个元素及其所有子元素。但是我没有找到一种方法来指定效果应该在指定的时间延迟后开始。
I want to fade out an element and all its child elements after a delay of a few seconds. but I haven't found a way to specify that an effect should start after a specified time delay.
推荐答案
setTimeout(function() { $('#foo').fadeOut(); }, 5000);
5000是五秒(以毫秒为单位)。
The 5000 is five seconds in milliseconds.
这篇关于延迟JQuery效果的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文