Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/uiur/animationend
Detect when CSS animations have ended
https://github.com/uiur/animationend
Last synced: 3 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 (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2018-01-18T17:15:16.000Z (almost 7 years ago)
- Last Synced: 2024-04-15T02:43:49.454Z (9 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
[![npm version](https://badge.fury.io/js/animationend.svg)](http://badge.fury.io/js/animationend)
[![Build Status](https://travis-ci.org/uiureo/animationend.svg?branch=master)](https://travis-ci.org/uiureo/animationend)[![Sauce Test Status](https://saucelabs.com/browser-matrix/uiureo-animationend.svg)](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