TransitionEnd is an agnostic and cross-browser library to work with event transitionend.
npm install transitionEndTransitionEnd is an agnostic and cross-browser library to work with event transitionend.
|
|
|
| ![]()
--- | --- | --- | --- | --- |
1.0+ ✔ | 4.0+ ✔ | 10+ ✔ | 10.5 ✔ | 3.2+ ✔ |
``shell`
npm install transitionEnd
Or Bower too:
`shell`
bower install transitionEnd
Or simply pick up the file from src directory.
bind(callback)unbind()whichTransitionEnd()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"
``