-
Notifications
You must be signed in to change notification settings - Fork 1
jQuery Plugin API Reference
There are a variety of ways to get content into Stepwise--all of which result in the delivery of Stepwise XML to the plugin.
You can load a Stepwise XML file directly by specifying the path to the file and the appropriate data type:
$("#output").stepwise({source:"myscript.xml", dataType:"xmlfile"});You can also pass a Stepwise XML document directly into the plugin by using the "xml" data type:
$("#output").stepwise({source:xmlDoc, dataType:"xml"});Content creators will rarely want to author in XML directly, so Stepwise includes a plain text parser which converts every line into a discrete step. To load a text file, specify the path to the file and use the "textfile" data type:
$("#output").stepwise({source:"myscript.txt", datatype:"textfile"});You can also load a string directly:
var str = "Hello" + "\n" + "world";
$("#output").stepwise({source:str, datatype:"text"});A more robust option is the Google Sheets parser, which converts a specially formatted Sheets document into Stepwise XML. This is the fastest way to author sophisticated Stepwise content.
The Google Sheets document must first be published to the web in Google Sheets using File > Publish to the Web. You can pass in either the document's URL (it's actual URL, not its Publish to the Web link) or its id.
$.fn.stepwise.getXMLFromSheet(sheetURLOrId, function(xml) {
$("#output").stepwise(source: xml, dataType: 'xml');
});By default, Stepwise will output the visible content (if any) of individual steps to the DOM element referenced in the selector (in the examples above, the element with the id "output").
- Stepwise
- Score
- Step
- Sheets
- AbstractEffect
- Stepfade