/transitionEnd

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

Primary LanguageJavaScript

TransitionEnd

Build Status

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

Methods

  • 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"