使用 jQueryUI 选项卡切换选项卡时是否可以交叉淡入淡出?
所以我知道可以使用 jQuery UI 选项卡来实现淡入/淡出效果。这是我必须执行的代码:
$("#Tabs").tabs({ fx: [{ opacity:'hide', duration:1000 },
{ opacity:'show', duration:1000 }] });
这将完全淡出当前选项卡,然后才开始淡入新选项卡,因此您最终会在一瞬间出现此空白。
我实际上需要的是交叉淡入淡出效果,这意味着当我单击另一个选项卡时,新选项卡的淡入将在当前选项卡淡出的同时开始。
So I know it is possible to do this fade-in/fade-out effect with jQuery UI Tabs. And this is the code I have to do it:
$("#Tabs").tabs({ fx: [{ opacity:'hide', duration:1000 },
{ opacity:'show', duration:1000 }] });
This will fade out current tab completely and only then start fading in the new one, so you end up with this blank space for a split second.
What I actually need is more of a cross-fade effect, meaning that when I click on another tab, the fading in of a new tab would start at the same time as fading out of the current one.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
哎哟。只是花了最后三十分钟试图让 UI 选项卡和 Cycle 很好地发挥作用,但运气不佳。我最终得到的是这个演示。
您会对没有选项卡感到失望,但应该很容易作弊并使这些链接看起来像选项卡(我仍在尝试,我自己也喜欢这个)。
Ouch. Just spent the last thirty minutes trying to get UI Tabs and Cycle to play nicely, without much luck. What I ended up with is this demo.
You will be disappointed that there are no tabs, but it should be fairly easy to cheat and make those links look like tabs (I'm still trying, I would like this myself).
抱歉,看起来不可能,因为此票证尚未完成:
http://bugs.jqueryui。 com/ticket/3927
Sorry, looks like it is not possible since this ticket hasn't been completed:
http://bugs.jqueryui.com/ticket/3927