elShaker is a jQuery plugin for simple side to side element shaking. Perfect to visualize a wrong input in form submissions.
jQuery (v1.10.2 is included)
Once you've added jquery.elshaker.js
to the list of script files that are loaded in your html page, simply call the shake method on the element:
$('element').shake(options);
Name | Type | Default | Description |
---|---|---|---|
shakes | int | 3 | Total number of element shakes, where each shake consists of a shake left and a shake right |
distance | int | 10 | Number of pixels to shake to each side |
duration | int | 500 | Overall time of the animation, split between all animation parts |
$('#myelement').shake({shakes: 3, distance: 10, duration: 500});
Copyright (c) 2013, Leandigo (www.leandigo.com)
Released under the MIT License. See the LICENSE file for details.