0.0.1 • Published 9 years ago

animationend v0.0.1

Weekly downloads
6
License
MIT
Repository
-
Last release
9 years ago

animationend

npm version Build Status

Sauce Test Status

Detect when CSS transitions/animations have ended. Cross-browser tested.

The function returns ES6 Promise.

var animationEnd = require('animationend')

var element = document.getElementById('id')
animate(element)

animationEnd(element).then(function(event) {
  // called on transitionend or animationend
})

animationEnd(element, function(event) {
  // also you can use a normal callback
})

Installation

npm install --save animationend

License

MIT