Javascript helper for animate.css
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(..)
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:
animateCss.animate( element, {
animationName: 'zoomIn',
duration: 500,
callbacks: [
function(){
// zoomIn animation complete, do sth
}
]
});
$ npm install
$ npm run build
MIT