I am going to use JQuery UI Tabs Plugin on my web application.
And now I need some suggestions to resolve problems.
First, I want to the new added tab to be selected when new tab and its contents had been created. E.g. When I click to make a new tab ,the new tab and its contents should be display as soon as possible.
Second, I need a button beside tab-list [ should be the last tab ] to create a new blank tab and contents.Just link firefox or chrome’s tab style.So,I can let the user to load the new contents by himself.
Thank you very much for any kind of suggestions !!
[UPDATE]
To switch the new created Tab.There is a plugin option to do it:
Zero-based index of the tab to be selected on initialization. To set all tabs to unselected pass -1 as value.
Code examples
Initialize a tabs with the selected option specified.
$( ".selector" ).tabs({ selected: 3 });
Get or set the selected option, after init.
//getter
var selected = $( ".selector" ).tabs( "option", "selected" );
//setter
$( ".selector" ).tabs( "option", "selected", 3 );
First
when u create a new tab add the class
.ui-tabs-selectedto the newly created tab… u can use $("#idOfNewlyCreatedTab").addClass(".ui-tabs-selected")and make sure to remove this class from the previously currently selected tab…