Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

jQuery UI Tabs - Available fx options

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

The only ones I've seen so far are:

  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.

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

like image 257
Jason Berry Avatar asked Aug 29 '09 06:08

Jason Berry


People also ask

How to enable tabs in jQuery?

Under the section of the docs for $(selector). tabs('enable', n) there is this statement: To enable more than one tab at once reset the disabled property like: $('#example'). tabs("option","disabled",[]); .

How do I know which tab is selected in jquery?

Try this instead: var ref_this = $("ul. tabs li a. active");


1 Answers

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:

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

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

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

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

like image 143
Christian C. Salvadó Avatar answered Sep 25 '22 22:09

Christian C. Salvadó