How to get the default loaded tab text in JQuery UI tabs plugin?
This is my code to get the tab's text when I click the tab:
$('#tab').tabs({
fx: { opacity:'toggle', duration:300 },
select: function(event, ui) {
var text = $(ui.tab).text();
}
});
But how can I get the default selected tab's text
when 开发者_C百科it created.E.g: Three tab:
Tabs-Menu1 Tabs-Menu2 Tabs-Menu3
And the Tabs-Menus1
was default selected when the tabs was loaded.And I want to get the Tabs-Menu1
tab's text at the tabs was loaded.
Thank you very much!!
Use create
to run a callback function when the tabs are created:
create: function(event, ui) {
var text = $(ui.tab).text();
}
精彩评论