Description: Add step to scenario.
step
Type: Function()
For synchronous step:
scenario.addStep(function(context) { // step code })For asynchronous step:
scenario.addStep(function(context) { return jQuery.Deferred(function(def){ // step code def.resolve(); }) })using callback function
scenario.addStep(function(context, done) { // step code done(); })
Use context parameter to share data between steps.
Description: remove DIV element added by addStepBlockScreen method.
Description: add glow effect to specified element.
options
Type: PlainObject
A map of glow effect options.
element
Type: String (jQuery selector), or jQuery object, or DOM Element
Element(s) to which you want to apply glow effect
color
Type: String
Default: red
Glow color
blur
Type: Number
Default: 5
Glow blur
spread
Type: Number
Default: 3
Glow spread
duration
Type: Number
Default: 200
Glow animation duration in milliseconds
easing
Type: String
Default: swing
Glow animation easing
scenario.addStepGlow({ element: '.selector', color: '#00FF00', duration: 500 })
Description: remove glow effect for specified element.
options
Type: PlainObject
A map of glow effect options.
element
Type: String (jQuery selector), or jQuery object, or DOM Element
Element(s) for which you want to remove glow effect
color
Type: String
Default: red
Glow color
blur
Type: Number
Default: 5
Glow blur
spread
Type: Number
Default: 3
Glow spread
duration
Type: Number
Default: 200
Animation duration in milliseconds
easing
Type: String
Default: swing
Animation easing
scenario.addStepUnglow({ element: '.selector', color: '#00FF00', duration: 500 })
Description: add a custom animation step
fromVal
Type: Number
Initial animation value
toVal
Type: Number
Value that the animation will move toward
duration
Type: Number
A number determining how long the animation will run
step
Type: Function
A function to be called after each step of the animation
easing
Type: String
Default: swing
Animation easing
scenario.addStepAnimate(0, 100, 500, function(val){ $('.slider').slider('setValue', val); }, 'swing')
Description: add a custom multi-property animation step
from
Type: PlainObject
Initial animation values
to
Type: PlainObject
Values that the animation will move toward
duration
Type: Number
A number determining how long the animation will run
step
Type: Function
A function to be called after each step of the animation
easing
Type: String
Default: swing
Animation easing
// Animate three sliders simultaneously scenario.addStepAnimateMultiple( {red: 0, green: 255, blue: 0}, {red: 255, green: 0, blue: 255}, 500, function(val){ $('#slider-r').slider('setValue', val.red); $('#slider-g').slider('setValue', val.green); $('#slider-b').slider('setValue', val.blue); }, 'swing')