Search.../

tabs

Gets a list of all the tabs contained in the tabs element.

Description

The tabs list is in the same order as the tab menu items appear.

Type:

Array<Tab>Read Only

Was this helpful?

Get a list of tabs in a tabs element

Copy Code
1let myTabs = $w("#myTabsElement").tabs;
2
3let numberOfTabs = myTabs.length; // 3
4
5let firstTabId = myTabs[0].id; // "singleTab1"
6let firstTabLabel = myTabs[0].label; // "First Tab"
7let secondTabId = myTabs[1].id; // "singleTab2"
8let secondTabLabel = myTabs[1].label; // "Second Tab"
9let thirdTabId = myTabs[2].id; // "singleTab3"
10let thirdTabLabel = myTabs[2].label; // "Third Tab"