Instances
Levi Kovacs avatar
Written by Levi Kovacs
Updated over a week ago

Whenever a component is initialized an instance is created for it. This is returned on initialization and the instance is reachable from inside the events. Through the instance access to methods and properties is exposed.

For modal controls, whenever the display mode is: top, bottom, center or bubble, mobiscroll guarantees that only one instance is open at a time. A reference is stored in the 

mobiscroll.activeInstance

It can be used for setting options runtime, for accessing values and everything that is tied to the component after initialization, during usage and inside events.

What's next?

Did this answer your question?