beforeChange

Arguments

oldTabNumberNumber

The tab pane number that currently has focus. Only available if the Tab Control type is 'Tab'.

tabNumberString

The target tab number. Only available if the Tab Control type is 'Tab'.

targetTabNumberString

The accordion pane the user is trying to toggle. Only available if the Tab Control type is 'Accordion'.

stateObject

Current state of each accordion pane. Only available if the Tab Control type is 'Accordion'.

Description

Fires before the tab is changed. Return false to cancel the action.

Discussion

The beforeChange event fires before a tab or accordion pane is opened. If this event returns false, the action is cancelled.

If the Tab control is configured as a 'Tab' type, your code can reference oldTabNumber and tabNumber.

If the Tab control is configured as an 'Accordion' type, your code can reference targetTabNumber and state. To see what's in the state object, add the following code to the event:

alert(JSON.stringify(state));