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>