Hello shimmoril,
If you want to get the tab’s position based on its content, this code snippet should do the job:
var yourContent; // this variable holds the value of the saved content var currentContent; var tabPosition; // this variable will hold the position of the tab with the saved content var tabsCount = $("#jqxTabs").jqxTabs('length'); for (var i = 0; i < tabsCount; i++) { currentContent = $("jqxTabs").jqxTabs('getContentAt', i); if (currentContent == yourContent) { tabPosition = i; $("#jqxTabs").jqxTabs('setTitleAt', tabPosition, "New title of tab"); break; }; };
Alternatively, you may get the active tab when you select it. Here is how:
$("#jqxTabs").bind('selected', function (event) { var selectedTab = event.args.item; });
Best Regards,
Dimitar
jQWidgets team
http://www.jqwidgets.com/