Skip to content

leandigo/elShaker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

jQuery plugin for simple element shaking

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published