TransitionEnd event
Hi folks,
today I've figured out how can we check, that a transition is ended on a certain element with JS.
I'm using jQuery in this example, however if you're using pure JS you can use a simple addEventListener() call on the element.
$("someSelector").on("transitionend", function () {
/** For IE and Firefox */
doFancyStuffz();
}).on("oTransitionEnd", function () {
/** For Opera */
doFancyStuffz();
}).on("webkitTransitionEnd", function () {
/** For Webkit */
doFancyStuffz();
});
I hope you find it useful :)
Written by Babos Csaba
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Css3
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#