Ecosyste.ms: Awesome

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

Awesome Lists | Featured Topics | Projects

https://github.com/EvandroLG/transitionEnd

:dizzy: TransitionEnd is an agnostic and cross-browser library to work with transitionend event.
https://github.com/EvandroLG/transitionEnd

agnostic javascript transitionend transitionend-event

Last synced: about 1 month ago
JSON representation

:dizzy: TransitionEnd is an agnostic and cross-browser library to work with transitionend event.

Awesome Lists containing this project

README

        

# TransitionEnd

TransitionEnd is an agnostic and cross-browser library to work with event transitionend.

## Browser Support

Chrome | Firefox | Internet Explorer | Opera |
--- | --- | --- | --- | --- |
1.0+ ✔ | 4.0+ ✔ | 10+ ✔ | 10.5 ✔ | 3.2+ ✔ |

## Installation
To install Selecting, execute:

```shell
npm install transitionEnd
```

Or Bower too:
```shell
bower install transitionEnd
```

Or simply pick up the file from src directory.

## Methods
* transitionEnd(element).bind(callback)
* transitionEnd(element).unbind()
* transitionEnd(element).whichTransitionEnd()

## How does it work?
```js
var box = $("#box"); // or document.getElementById("box")
var foo = $("#foo");

transitionEnd(box).bind(function(){
foo.addClass("on");
transitionEnd(box).unbind();
});

var transition = transitionEnd(box).whichTransitionEnd(); // return for example "webkitTransitionEnd"
```