Check documentation for the latest version of dhtmlxSuite close DHTMLX Docs

close

closes (unloads) the specified tab from the tabbar

void close( [string|number|boolean actvId] );
actvIdstring|number|boolean(optional) if the specified tab is selected - selects the nearest tab or specifies its id, default true

Example

var myTabbar = new dhtmlXTabBar("parentId");
 
myTabbar.addTab("a1", "Rage", null, null, true);
myTabbar.addTab("a2", "Motorhead");
myTabbar.addTab("a3", "Poisonblack");
 
myTabbar.tabs("a1").close(); // close "a1" and select "a2"
// or
myTabbar.tabs("a1").close("a3"); // close "a1" and select "a3"
// or 
myTabbar.tabs("a1").close(false); // close "a1" and don't select anything

Change log

added in version 4.0

Back to top