TransitionEnd is an agnostic and cross-browser library to work with event transitionend.
- transitionEnd(element).
bind(callback)
- transitionEnd(element).
unbind()
- transitionEnd(element).
whichTransitionEnd()
Examples
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"