Reputation: 134
I disabled the tab like this:
$("#tabs").tabs({ disabled: [1, 2] });
But when I try to enable one of the tabs it is not working:
$("#tabs").tabs({ enabled: [1] });
Is there something I'm doing wrong here?
Upvotes: 3
Views: 9849
Reputation: 75993
I believe you are looking for the .tabs( "option" , optionName , [value] )
method found on this page: http://jqueryui.com/demos/tabs/ (click the "Method" tab and find "option" below).
$("#tabs").tabs( "option" , "disabled" , [2] );
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",[]);
.
Upvotes: 3
Reputation: 3723
Try $("selector").tabs("enable", n);
where n is the index of the tab
Upvotes: 3
Reputation: 21249
Never used jQuery Tabs but I can't see any option for enabled
.
Have you tried to just update the list of disabled tabs to remove tab 1 ?
$("#tabs").tabs({ disabled: [2] });
or
$("#tabs").tabs( "enable" , 1 );
(that's in the docs)
Upvotes: 3