Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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

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)