Search.../

orderTabs( )

Changes the order of the tabs in a tabs element.

Description

The orderTabs() function changes the order in which tab menu items are displayed. It reorders the array contained in the tabs property.

Authorization

Request

This endpoint does not take any parameters

Response Object

Fulfilled - when the tabs are reordered.

Returns an empty object.

Status/Error Codes

Was this helpful?

Reorder tabs using tab IDs

Copy Code
1$w("#myTabsElement").orderTabs(["singleTab3", "singleTab1", "singleTab2"]);
2
3let myUpdatedTabs = $w("#myTabsElement").tabs;
4/*
5 * [
6 * $w("#singleTab3"),
7 * $w("#singleTab1"),
8 * $w("#singleTab2")
9 * ]
10 */
Reorder tabs using tab elements

Copy Code
1$w("#myTabsElement").orderTabs([$w("#singleTab3"), $w("#singleTab1"), $w("#singleTab2")]);
2
3let myUpdatedTabs = $w("#myTabsElement").tabs;
4/*
5 * [
6 * $w("#singleTab3"),
7 * $w("#singleTab1"),
8 * $w("#singleTab2")
9 * ]
10 */