Bind and unbind animation events.
Component:
component install digitaledgeit/js-animation-events
var events = require('animation-events');
var el = document.querySelector('.js-ball');
events
.bind(el, 'start', function(event) {
console.log('start', event);
})
.bind(el, 'end', function(event) {
console.log('end', event);
})
.once(el, 'iteration', function(event) {
console.log('iteration', event);
})
;
Get whether animations are supported by the browser.
Get whether an element has an animation applied.
Add a callback for an animation event (start
, end
or iteration
).
Remove a callback for an animation event (start
, end
or iteration
).
Add a callback for a single animation event (start
, end
or iteration
).
browserify index.js -r ./index.js:animation-events > build/build.js
mochify