如何使用jQuery淡出div? [英] How can I fade out a div using jQuery?

查看:116
本文介绍了如何使用jQuery淡出div?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否有任何方法可以在不使用setTimeOut函数的情况下在5秒后淡出div?

Is there any way to fadeout a div after 5 Seconds without using a setTimeOut function?

推荐答案

每个人都知道在jquery 1.4中现在有一个延迟函数,对吧?

everyone knows that in jquery 1.4 there's a delay function now, right?

$('#div').delay(5000).fadeOut(400)

这就是您的方法,而无需添加任何自定义功能或插件.它是jquery 1.4的本机

that's how you do it, without having to add any custom functions or plug-ins. it's native to jquery 1.4

这篇关于如何使用jQuery淡出div?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆