Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there a way to tell if an element has completed a CSS3 transition?

I'm looking for an event, callback or other way to tell when a CSS3 transition completes.

Is this possible?

like image 459
buley Avatar asked Apr 03 '12 14:04

buley


2 Answers

Use the transitionend event. Note that vendor-specific prefixes have to be added.

like image 169
Rob W Avatar answered Oct 06 '22 03:10

Rob W


Listen for the transitionend event:

https://developer.mozilla.org/en/CSS/CSS_transitions#Detecting_the_completion_of_a_transition

Since it uses browser prefixes, you'll have to listen to several different versions of that event for different browsers.

like image 37
Richard Connamacher Avatar answered Oct 06 '22 01:10

Richard Connamacher