Reputation: 5260
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?
Upvotes: 1
Views: 1102
Reputation: 65
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 );
Upvotes: 0
Reputation: 8482
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);
Upvotes: 1