tags:

views:

8

answers:

1

I am using jQuery UI tabs and I want to find whether a tab is disabled or not. This how I initiate the UI tabs:

 $("#tabs4").tabs();
A: 

http://jqueryui.com/demos/tabs/#option-disabled

Disables (true) or enables (false) the tabs. Can be set when initialising (first creating) the tabs.

Initialize a tabs with the disabled option specified.

$( ".selector" ).tabs({ disabled: true });

Get or set the disabled option, after init.

//getter
var disabled = $( ".selector" ).tabs( "option", "disabled" );
//setter
$( ".selector" ).tabs( "option", "disabled", true );
David Titarenco
To set the tabs disabled I use: $("#tabs4").tabs({ disabled: [0, 1, 2] });And then: var disabled = $("#tabs4").tabs("option","disabled"); alert(disabled);The alert returns this: [object Object]