getActive()
gets the id of the active tab
getActive(): string;
Returns:
A string with the id of the active 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"}
]
});
const active = tabbar.getActive(); // -> "2"
Related sample: Tabbar. Get active