11

I have three subtabs under main tab, when I click main tab defauly I am displyaing tab1 data using jquery grid, now initially I need disable the tab2 and tab3. how?

1
  • 2
    You should include a sample of your code with the question to make it easier (possible, even) for people to help. Commented Apr 13, 2010 at 13:41

2 Answers 2

21

From the jQuery UI tabs documentation. Note that it's zero-based so this disables the 2nd and 3rd tabs.

$( ".selector" ).tabs( { disabled: [1, 2] } );
Sign up to request clarification or add additional context in comments.

2 Comments

On double click on any row in jquery grid can i enbale tab1? something like this ondblClickRow: function(rowid, iRow, iCol, e) { $("#tabs").tabs({ enabled: 1 }); var $tabs = $('#tabs').tabs(); var selected = $tabs.tabs('select', 1); but its not working? thanks
Sorry I got it i did something like this on doubleclick evnt.. $("#tabs").tabs('enable',1); thanks for yoru time
10

Assuming you are using the jQuery UI tabs:

You can use "disable" to disable a given tab after initialization:

jQuery("#myTab").tabs( "disable" , index )

Alternatively, if you need to disable tabs when the tabs are first displayed, you can pass the disabled option and an array of tabs to disable:

$( ".selector" ).tabs( { disabled: [1, 2] } );

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.