The Shake effect rapidly shakes the target element a distance of 20 pixels from left to right.
You can only attach this effect to the following HTML elements: address, blockquote, dd, div, dl, dt, fieldset, form, h1, h2, h3, h4, h5, h6, iframe, img, object, p, ol, ul, li, applet, dir, hr, menu, pre, or table.
The following table lists available options for the Shake effect.
Option |
Description |
---|---|
duration |
Fixed at 500 milliseconds in Spry 1.4. Only editable in Spry 1.5 and later. |
transition |
Determines the type of transition. The default is Spry.linearTransition. |
fps |
Determines the number of frames per second (fps) of the animation. The default is 60. |
setup |
Lets you define a function that is called before the effect begins, e.g., setup:function (element,effect){/* ... */}. |
finish |
Lets you define a function that is called after the effect finishes, e.g., finish:function (element,effect){/* ... */}. |
Sample code:
var effect Spry.Effect.Shake('targetID'); |
effect.start(); |