setActive()
sets an active tab
setActive(id: string): void;
Parameters:
id: string
- the id of a tab
Example
const tabbar = new dhx.Tabbar("tabbar_container", {
mode: "top",
views:[
{ id: "1", tab: "tab-1", css:"panel flex"},
{ id: "2", tab: "tab-2", css:"panel flex"},
{ id: "3", tab: "tab-3", css:"panel flex"},
{ id: "4", tab: "tab-4", css:"panel flex"}
]
});
tabbar.setActive("2");
Related sample: Tabbar. Set active