Constructor
new SequenceRunner(settingsopt)
Creates a new SequenceRunner instance.
Parameters
settings:Object
(optional)
The sequence settings.
settings.selector:String
= ".sequence-runner"
(optional)
The HTML container to write your content to. It can be an id, class, tag, etc.
settings.content:String|Array
= "."
(optional)The content to add to your selected HTML container(s). If set to a string, the
content will be duplicated based on the amount set in the 'duplicate' settings
property. If set to an array, the duplicate property will be auto set based on
the length of the array.
settings.duplicate:Number
= 3
(optional)The number of times to duplicate your content.
settings.delay:Number
= 500
(optional)The delay between changes.
settings.loop:Number
= NaN
(optional)The amount of times to loop between changes. If set to 'NaN,' the loop will
be infinite.
Details
Source: SequenceRunner.js, line 11
Members
Methods
onChange(callback):SequenceRunner
Calls your function on every change.
Parameters
Returns
- Type
- :SequenceRunner
Source: SequenceRunner.js, line 149
onComplete(callback):SequenceRunner
Calls your function at the end of the loop (assuming you set a loop).
Parameters
Returns
- Type
- :SequenceRunner
Source: SequenceRunner.js, line 168
pause():SequenceRunner
Pauses the sequence. This method clears the interval, but does not empty the HTML container(s).
Returns
- Type
- :SequenceRunner
Source: SequenceRunner.js, line 127
start():SequenceRunner
Starts the sequence.
Returns
- Type
- :SequenceRunner
Source: SequenceRunner.js, line 72
stop():SequenceRunner
Stops the sequence. This method clears the interval and empties the HTML container(s).
Returns
- Type
- :SequenceRunner
Source: SequenceRunner.js, line 137
Type Definitions
onChangeCallback(content, count, loop)
The callback used by the 'onChange' method.
Parameters
content:*
The current content.
count:Number
The current tick/count.
loop:Number
The current loop.
Source: SequenceRunner.js, line 155
onCompleteCallback(content, count, loop)
The callback used by the 'onComplete' method.
Parameters
content:*
The current content.
count:Number
The current tick/count.
loop:Number
The current loop.
Source: SequenceRunner.js, line 174