jQuery UI 选项卡 - 可用的 fx 选项

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/1350666/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-26 11:16:15  来源:igfitidea点击:

jQuery UI Tabs - Available fx options

jqueryjquery-uitabsjquery-ui-tabs

提问by Jason Berry

I haven't been able to find any real documentation on this, so I'm wondering if anyone knows all of the available fxoptions for jQuery UI Tabs?

我一直无法找到任何关于此的真正文档,所以我想知道是否有人知道jQuery UI Tabs 的所有可用fx选项?

The only ones I've seen so far are:

目前我看到的只有:

  1. opacity: "toggle";
  2. height: "toggle";
  1. opacity: "toggle";
  2. height: "toggle";

A crossfade would be nice, though I don't think I've seen this done with jQuery UI Tabs yet.

交叉淡入淡出会很好,但我认为我还没有看到使用 jQuery UI Tabs 完成此操作。

Also, I can't even find how to specify the fx speed, though the documentation mentions I should be able to change it.

此外,我什至找不到如何指定 fx 速度,尽管文档提到我应该能够更改它。

回答by CMS

Basically the fx option is used to call animate, you can specify a single option or two in an array, that will be used to do the show and hide effects:

基本上 fx 选项用于调用animate,您可以在数组中指定一个或两个选项,用于显示和隐藏效果:

 $('#tabs').tabs({ fx: [{opacity:'toggle', duration:'normal'},   // hide option
                        {opacity:'toggle', duration:'fast'}] }); // show option

The fx speed can be specified using a durationmember on the option object.

可以使用duration选项对象上的成员指定 fx 速度。

Basically you can do the same transformations that you can with animate.

基本上,您可以执行与 animate 相同的转换。

Give a look to the ui.tabs.js file, on the line 250 here, to understand better how the animations are setup.

查看 ui.tabs.js 文件,位于此处的第 250 行,以更好地了解动画是如何设置的。

回答by Shuklendu

opacity: "toggle";
height: "toggle";
width: "toggle";