-
Notifications
You must be signed in to change notification settings - Fork 1
Stepwise JavaScript API Reference
Instantiation of the Stepwise jQuery plugin results in a Stepwise object, which is automatically assiged as a jQuery data property to the element on which the plugin was invoked, under the key "plugin_stepwise".
The simplest invocations of the plugin include only a target DOM element and a string which will be parsed into steps:
$("#output").stepwise("1 2 3 4");See the Loading content section for details on additional methods and configuration options when initalizing the plugin. By default, Stepwise will set up input handling for clicks, touches, and keypresses.
| Property | Description |
|---|---|
| element | The DOM element(s) associated with this instance of the plugin. |
| options | Current configuration options of the plugin. Changing these after instantiation will have no effect. |
| score | A Score object, which manages the content and state of the current story. |
The nextStep() method causes the Stepwise object to execute the next step in the currently loaded script. The plugin calls this method automatically in response to user input; the only time you'll want to call it manually is if you want some other kind of event to trigger the next step in the current story.
The Score object manages the content and state of the current story, and is created along with the root Stepwise instance.
The Sequence object manages a group of steps objects which are to be triggered successively.
The Step object represents a single step in a score.
The Character object represents a single agent in a score.
The Location object represents a geographical location in a score.