问题
I need to select the previously active tab when i click the new tab .How do i do that ?
回答1:
$('#edit_tabs').tabs( {
selected: 2, // which tab to start on when page loads
select: function(e, ui) {
var t = $(e.target);
alert( "selected is " + t.data('selected.tabs') )
// Index of the PREVIOUSLY selected tab
return true;
}
});
来源:https://stackoverflow.com/questions/8664658/jquery-ui-tabs-get-previously-selected-tab