animate.css-js
v0.0.9
Published
animate.css javascript helper
Downloads
141
Readme
animate.css-js
Javascript helper for animate.css
How to use
add the animate.css styles
var animateCss = require('animate.css-js'); // Or add animateCss.bundle.js for the standalone version
var element = document.querySelector('.some-element');
// use animateCss.show(..), animateCss.hide(..)
// or animateCss.animate(..)
API
animate(element, [, options])
- options:
- animationName {string} - one of the animate.css animation names
- duration {number} - the animation duration in ms
- callbacks {function[]}
- options:
show(element[, options])
- options:
- animationName {string} - one of the animate.css animation names, defaults to 'slideInDown'
- duration {number} - the animation duration in ms, defaults to 350
- callbacks {function[]}
- options:
hide(element[, options])
- options:
- animationName {string} - one of the animate.css animation names, defaults to 'slideOutUp'
- duration {number} - the animation duration in ms, defaults to 350
- callbacks {function[]}
- options:
Example
animateCss.animate( element, {
animationName: 'zoomIn',
duration: 500,
callbacks: [
function(){
// zoomIn animation complete, do sth
}
]
});
build
$ npm install
$ npm run build
License
MIT