Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/awcross/pfx-transition
Browser prefix helper for transition event
https://github.com/awcross/pfx-transition
Last synced: about 11 hours ago
JSON representation
Browser prefix helper for transition event
- Host: GitHub
- URL: https://github.com/awcross/pfx-transition
- Owner: awcross
- License: mit
- Created: 2017-01-13T01:06:01.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2017-01-13T21:53:32.000Z (almost 8 years ago)
- Last Synced: 2024-11-07T01:45:16.514Z (13 days ago)
- Language: JavaScript
- Size: 5.86 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- License: license
Awesome Lists containing this project
README
# pfx-transition [![Build Status](https://travis-ci.org/awcross/pfx-transition.svg?branch=master)](https://travis-ci.org/awcross/pfx-transition)
> Browser prefix helper for transition event
## Install
```
$ npm install --save pfx-transition
```## Usage
```js
const transition = require('pfx-transition');const slides = document.querySelectorAll('.slide');
slides.forEach(slide => {
slide.addEventListener(transition.end, () => {
// the transition has finished
}, false);
});
```## API
### transition
Object containing two properties, `start` and `end`, that map to [transitionstart](https://developer.mozilla.org/en-US/docs/Web/Events/transitionstart) and [transitionend](https://developer.mozilla.org/en-US/docs/Web/Events/transitionend), respectively, and include the correct vendor transition prefix (if needed).
## License
MIT © [Alex Cross](https://alexcross.io)