public
Description: script.aculo.us is an open-source JavaScript framework for visual effects and interface behaviours.
Home | Edit | New

Effect.Shake

Combination Effects > Effect.Shake

Moves the element slightly to the left, then to the right, repeatedly.

Examples


Effect.Shake('id_of_element');

Options

Option Description
duration float value, in seconds, defaults to 0.5
distance integer value, defaults to 20, the number of pixels to move horizontally

Notes

Works safely with most Block Elements, except tables.

Demo

Source code of this demo


<div id="shake_demo" style="width:150px; height:40px; background:#ccc; text-align:center;>
  <a href="#" onclick="new Effect.Shake('shake_demo'); return false;" style="line-height:40px;">Click me to shake!</a>
</div>
Last edited by Thadeu, Sat Apr 25 22:30:17 -0700 2009
Home | Edit | New
Versions: