Check documentation for the latest version 6.0 of dhtmlxSuite goToNextTab DHTMLX Docs

goToNextTab

selects the tab next to the active one

void goToNextTab();

Example

var myTabbar = new dhtmlXTabBar("parentId");
 
myTabbar.addTab("a1", "Rage", null, null, true);
myTabbar.addTab("a2", "Motorhead");
myTabbar.addTab("a3", "Poisonblack");
 
myTabbar.disableTab("a2");
// -> state: a1 - selected, a2 - disabled not selected, a3 - not selected
 
myTabbar.goToNextTab();
// -> state: a1 - not selected, a2 - disabled selected, a3 - not selected
 
myTabbar.setTabInActive();
// -> state: a1 - not selected, a2 - disabled not selected, a3 - not selected
 
myTabbar.goToNextTab();
// -> state: a1 - selected, a2 - disabled not selected, a3 - not selected

Details

skips hidden tabs; selects disabled tabs if any; selects the first tab, if no one selected; if the last tab selected, does nothing

Back to top