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

getIndex

returns the tab's index

number getIndex();

Returns

numberthe tab's index or -1 if the tab doesn't exist

Example

var myTabbar = new dhtmlXTabBar("parentId");
 
myTabbar.addTab("a1", "Rage", null, null, true);
myTabbar.addTab("a2", "Motorhead");
 
// get index
var i1 = myTabbar.tabs("a1").getIndex(); // -> 0
var i2 = myTabbar.tabs("a2").getIndex(); // -> 1
var i3 = myTabbar.tabs("a3").getIndex(); // -> -1

Change log

added in version 4.0

Back to top