Skip to content

myang-git/jQuery-Element-Shaker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 

Repository files navigation

Requirement

jQuery Library

Install

Download the file jquery-element-shaker.js to the location your web app reads javascripts from, for example js, and reference it in your html:

<script src="/js/jquery-element-shaker.js"></script>

How To Use

Shaking a div for 500 ms with max drift of 10 pixels:

First create a div in the html:

<div id='shaking_div'>Shaking Shaking</div>

Then in the javascript:

$('#shaking_div').shake({dur: 500, drift: 10});

Same approach can be applied to other types of element as well.

See example.html for a working example.

Enjoy!

About

A small but useful jQuery plugin for shaking an HTML element for given duration and drift range

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published