an iterator, calls a user-defined handler for each tab
handler | function | a user-defined handler to call, tab object will be passed as a param |
var myTabbar = new dhtmlXTabBar("parentId");
// as an example - disable all tabs
myTabbar.forEachTab(function(tab){
// your code here
tab.disable();
// to get id
var id = tab.getId();
});
// the same in a different way
var ids = myTabbar.getAllTabs();
for (var q=0; q<ids.length; q++) {
myTabbar.tabs(ids[q]).disable();
}
can be useful when you need to perform the same operation for all tabs
function(tab){...} - here "tab" param is the same object which is returned by myTabbar.tabs(id)
added in version 4.0
Back to top