jQuery show()和hide()的更顺畅的替代方案 [英] A smoother alternative to jQuery show() and hide()

查看:468
本文介绍了jQuery show()和hide()的更顺畅的替代方案的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个隐藏列的页面设置,使用jQuery show()和hide()函数来滑入和滑出列。

I have a page setup with a hidden column using the jQuery show() and hide() functions to slide the column in and out.

然而它有点像笨重,在展示/隐藏时看起来不太顺畅;相比之下,我还有一个使用jquery UI手风琴的页面部分。当在这些部分之间切换时,过渡看起来非常漂亮和平滑......

However it's kind of "clunky" and does not look very smooth when showing/hiding; in contrast I also have a section of the page using jquery UI accordion. When switching between these sections the transition looks very nice and smooth...

是否有比show()/ hide()更好的功能,它看起来和手风琴一样好呢? (也许缓动参数可用于显示/隐藏功能,但我不确定如何正确使用它?)

Is there a better function than show()/hide() which looks as nice as the accordion does? (maybe the "easing" parameter can be used in the show/hide functions, but i'm not sure how to use this properly?)

推荐答案

我想你会想要使用 jQuery.fadeIn jQuery.fadeOut

这篇关于jQuery show()和hide()的更顺畅的替代方案的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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