Skip to content

Latest commit

 

History

History
49 lines (33 loc) · 1.37 KB

README.rst

File metadata and controls

49 lines (33 loc) · 1.37 KB

elShaker - A jQuery plugin for element shaking

elShaker is a jQuery plugin for simple side to side element shaking. Perfect to visualize a wrong input in form submissions.

Requirements

jQuery (v1.10.2 is included)

Usage

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);

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

Example

$('#myelement').shake({shakes: 3, distance: 10, duration: 500});

DEMO

License

Copyright (c) 2013, Leandigo (www.leandigo.com)

Released under the MIT License. See the LICENSE file for details.

Githalytics