Please enable JavaScript to view this site.

Navigation: Advanced topics > Programming topics > Tabs/Sections Javascript API > Tabs methods

Tabs API: moveTo

Scroll Prev Next More

 

Changes the order of the tabs. The n-th tab is moved to the m-th position. The m-th tab is moved to the n-th position.

 

If m is greater than the number of tabs, the n-th tab is moved to the end.

Syntax

moveTo( n, m )

Arguments

n

a zero-based index of the tab.

m

a zero-based index of the tab.

Return value

Returns a new index of the n-th tab.

Example

Third tab is moved to the fourth position. The fourth tab is moved to the third position.

 

var tabs = pageObj.getTabs();
tabs.moveTo(2,3);

See also:

RunnerPage object: getTabs

Tabs API: addTab

Page Designer: Tabs and sections

About Tabs/Sections API

 

Created with Help+Manual 7 and styled with Premium Pack Version 3 © by EC Software