Simple jQuery Plugin To Animate Html Elements - jAnimator
File Size: | 3.73 KB |
---|---|
Views Total: | 1163 |
Last Update: | |
Publish Date: | |
Official Website: | Go to website |
License: | MIT |
jAnimator is a simple and easy jQuery plugin to animate (shake or fade) Html elements with custom triggers by using CSS3 transforms.
How to use it:
1. Load the latest jQuery library and jQuery jAnimator plugin in the web page.
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script> <script type="text/javascript" src="jAnimator.js"></script>
2. Create an Html element where you want to apply an animation on mouse hover.
<div id="demo" class="test">HOVER</div>
3. Enable the animation.
<script> $(".test").jAnimator(); $("#demo").hover(function(){ $(this).trigger('jAnimRumble_start'); }, function(){ $(this).trigger('jAnimRumble_stop'); }); </script>
4. Default values for jAnimRumble_start
function.
$("#demo").trigger('jAnimRumble_start', [{x:2, y:2, r:1, s:10}]);
5. Default values for jAnimRumble_fade
function.
$("#demo").trigger('jAnimRumble_fade', [{repeat:true, rate:100, period:1000}]);
Change log:
2014-10-24
- fixed rotate.
This awesome jQuery plugin is developed by HMiard. For more Advanced Usages, please check the demo page or visit the official website.