1

I have some tabs created with jQuery UI After I create a new tab using the example in the page I linked, I want that the newly created tab is shown. Is it possible, if so how?

2 Answers 2

1

After adding your new tab you can use select method of tabs plug-in with length method. Check my example. I used same demo from jQuery UI demo pages.

$tabs.tabs( "add", "#tabs-" + tab_counter, tab_title ).tabs( 'select', $tabs.tabs('length') - 1);
0

For recent versions (1.10.x) of jQuery UI, use the following. It's assumed that numberOfTabs is used to keep track of the number of tabs.

$tabs.tabs( "option", "active", numberOfTabs-1 );

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.