https://github.com/uiur/animationend
Detect when CSS animations have ended
https://github.com/uiur/animationend
Last synced: 4 months ago
JSON representation
Detect when CSS animations have ended
- Host: GitHub
- URL: https://github.com/uiur/animationend
- Owner: uiur
- Created: 2015-02-02T07:38:25.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2018-01-18T17:15:16.000Z (over 7 years ago)
- Last Synced: 2025-02-01T17:05:17.009Z (4 months ago)
- Language: JavaScript
- Homepage:
- Size: 145 KB
- Stars: 6
- Watchers: 2
- Forks: 3
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# animationend
[](http://badge.fury.io/js/animationend)
[](https://travis-ci.org/uiureo/animationend)[](https://saucelabs.com/u/uiureo-animationend)
Detect when CSS transitions/animations have ended. Cross-browser tested.
The function returns ES6 Promise.
``` javascript
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