jQuery fadein()有效,但fadeout()无效 [英] jquery fadein() works, but fadeout() does not

查看:133
本文介绍了jQuery fadein()有效,但fadeout()无效的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这让我胆怯...这很好:

This is driving me batty... this works fine:

<div style="display:none" id="box">
    <img src="/images/wpgen_box1.jpg">
</div>
<script type="text/javascript">
    jQuery(document).ready(function(){
        setTimeout(function(){ jQuery('#box').fadein(); }, 5000);
    });
</script>

但这不起作用:

<div id="box"> 
    <img src="/images/wpgen_box1.jpg">
</div>
<script type="text/javascript">
    jQuery(document).ready(function(){
        setTimeout(function(){ jQuery('#box').fadeout(); }, 5000);
    });
</script>

所以,有人知道为什么我可以淡入但不能淡出吗?

So, anyone know why I can fade in but not out?

推荐答案

我不知道fadein的实际工作方式.应该是fade*I*n,与fadeOut相同.

I don't know how fadein works actually. it is supposed to be fade*I*n, same for fadeOut.

这篇关于jQuery fadein()有效,但fadeout()无效的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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