DeAnimate
A jQuery lightweight plugin for Animation
Back of Panel content .
Front of Panel content .
Getting Started
Download the production version or the development version.
In your web page:
<style>
.front, .back {
position: absolute;
left: 0;
top: 0;
}
</style>
<script src="jquery.js"></script>
<script src="dist/de-animate.min.js"></script>
<div id="myElement" class="card animated">
<div class="back">
<h3>Back of Panel flipInX</h3>
<p>Panel content Flipped X</p>
</div>
<div class="front">
<h3>Front of Panel flipInX</h3>
<p>Panel content Flipped X</p>
</div>
</div>
<script>
jQuery(function($){
$('#myElement').deAnimate({
trigger: 'click',
classIn: 'rotateIn'
});
});
</script>
Use API
$('#myElement').deAnimate({
// 'click' or 'hover'
trigger: string,
// your animation name. 'flipInX', 'rotateIn', etc.
classIn: string,
// optional. default true. The animations of in and ou will
// run in parallel or not
parallel: boolean,
// optional. default 500. Animation's speed in ms.
speed: number,
// front element selector. default 'auto'. If you choose 'auto',
// the plugin will search for the first element with the classes
// 'de-animate-front' or 'front' or the first child of the element
front: 'auto',
// back element selector. default 'auto'. If you choose 'auto',
// the plugin will search for the first element with the classes
// 'de-animate-back' or 'back' or the second child of the element
back: 'auto'
});
Important!
If you'll use a composed class animation (like Animate.css ones), you must add the class animated to the element you want to animate.
Animate.css help
Animate.css has a lot of animations and you can check all of them at animate.css github page but here a some of them:
- bounce
- flash
- pulse
- rubberBand
- shake
- headShake
- swing
- tada
- wobble
- jello
- bounceIn
- fadeIn
- fadeOut
- flipInX
- flipInY
- flipOutX
- flipOutY
- lightSpeedIn
- lightSpeedOut
- rotateIn
- rotateOut
- hinge
- rollIn
- rollOut
- zoomIn
- zoomOut
- slideInUp
- slideOutUp
Examples
-
Flip / Rotate
Back FlipInX
Panel content Flip In X.
toggle cardFront FlipInX
Panel content Flip In X.
toggle cardBack FlipInY
Panel content Flipped Y
toggle cardFront FlipInY
Panel content Flipped Y
toggle cardBack RotateIn
Panel content Rotate
toggle cardFront RotateIn
Panel content Rotate
toggle card -
Fade
Back FadeIn
Panel content Fade In
toggle cardFront FadeIn
Panel content Fade In
toggle cardBack FadeInDown
Panel content Fade In Down
toggle cardFront FadeInDown
Panel content Fade In Down
toggle cardBack FadeInDownBig
Panel content Fade In Down Big
toggle cardFront FadeInDownBig
Panel content Fade In Down Big
toggle cardBack FadeInLeft
Panel content Fade In Left
toggle cardFront FadeInLeft
Panel content Fade In Left
toggle cardBack FadeInLeftBig
Panel content Fade In Left Big
toggle cardFront FadeInLeftBig
Panel content Fade In Left Big
toggle cardBack FadeInRight
Panel content Fade In Right
toggle cardFront FadeInRight
Panel content Fade In Right
toggle cardBack FadeInRightBig
Panel content Fade In Right Big
toggle cardFront FadeInRightBig
Panel content Fade In Right Big
toggle cardBack FadeInUp
Panel content Fade In Up
toggle cardFront FadeInUp
Panel content Fade In Up
toggle cardBack FadeInUpBig
Panel content Fade In Up Big
toggle cardFront FadeInUpBig
Panel content Fade In Up Big
toggle card -
Zoom
Back ZoomIn
Panel content Zoom In
toggle cardFront ZoomIn
Panel content Zoom In
toggle cardBack ZoomInLeft
Panel content Zoom In Left
toggle cardFront ZoomInLeft
Panel content Zoom In Left
toggle cardBack ZoomInRight
Panel content Zoom In Right
toggle cardFront ZoomInRight
Panel content Zoom In Right
toggle cardBack ZoomInDown
Panel content Zoom In Down
toggle cardFront ZoomInDown
Panel content Zoom In Down
toggle cardBack ZoomInUp
Panel content Zoom In Up
toggle cardFront ZoomInUp
Panel content Zoom In Up
toggle card -
Bounce
Back BounceIn
Panel content Bounce In
toggle cardFront BounceIn
Panel content Bounce In
toggle cardBack BounceInLeft
Panel content Bounce In Left
toggle cardFront BounceInLeft
Panel content Bounce In Left
toggle cardBack BounceInRight
Panel content Bounce In Right
toggle cardFront BounceInRight
Panel content Bounce In Right
toggle cardBack BounceInDown
Panel content Bounce In Down
toggle cardFront BounceInDown
Panel content Bounce In Down
toggle cardBack BounceInUp
Panel content Bounce In Up
toggle cardFront BounceInUp
Panel content Bounce In Up
toggle card -
Others
Back LightSpeedIn
Panel content Light Speed In
toggle cardFront LightSpeedIn
Panel content Light Speed In
toggle cardBack RollIn
Panel content Roll In
toggle cardFront RollIn
Panel content Roll In
toggle card
Building
Developers can easily build DeAnimate using NPM.
NPM
For the developers interested in building DeAnimate:
Bower
For developers not interested in building the DeAnimate library... use bower to install and use the DeAnimate distribution files.
Change to your project's root directory.
bower install de-animate
Release History
- v0.2.2 beta release