fadeOut()和slideUp()同时? [英] fadeOut() and slideUp() at the same time?

查看:164
本文介绍了fadeOut()和slideUp()同时?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我找到了 jQuery:FadeOut然后是SlideUp ,这很好,但它不是那个。

I have found jQuery: FadeOut then SlideUp and it's good, but it's not the one.

我怎样才能 fadeOut() slideUp()同时?我尝试了两个单独的 setTimeout()调用具有相同的延迟但是只要页面加载就会发生 slideUp()

How can I fadeOut() and slideUp() at the same time? I tried two separate setTimeout() calls with the same delay but the slideUp() happened as soon as the page loaded.

有没有人这样做过?

推荐答案

你可以做点什么像这样,这是一个完整的切换版本:

You can do something like this, this is a full toggle version:

$("#mySelector").animate({ height: 'toggle', opacity: 'toggle' }, 'slow');

严格淡出:

$("#mySelector").animate({ height: 0, opacity: 0 }, 'slow');

这篇关于fadeOut()和slideUp()同时?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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