Change the multi-state box's current state to a specific state.
The changeState()
function returns a Promise that is resolved when
the multi-state box finishes moving from the current state to the state
referred to by stateReference
. stateReference
can be a state object or
a state id
.
You can retrieve State
objects to pass to the
stateReference
parameter from your multi-state box using the
currentState
or states
properties.
Note:
If you call changeState()
on a child multi-state box, it doesn't run until the parent box moves to the state where the child box is displayed.
This method doesn’t return any custom errors, but may return standard errors. Learn more about standard Wix errors.