Do something with a <div> element when a CSS transition has ended:
The transitionend event occurs when a CSS transition has completed.
Note: If the transition is removed before completion, e.g. if the CSS transition-property property is removed, the transitionend event will not fire.
For more information about CSS Transitions, see our tutorial on CSS3 Transitions.
The numbers in the table specify the first browser version that fully supports the event.
Numbers followed by "webkit", "moz" or "o" specify the first version that worked with a prefix.
Event | |||||
---|---|---|---|---|---|
transitionend | 26.0 4.0 as webkitTransitionEnd |
10.0 | 16.0 4.0 as mozTransitionEnd |
6.1 3.1 as webkitTransitionEnd |
12.1 10.5 as oTransitionEnd |
Note: For this event to work in Safari version 3.1 to 6.0, use the webkitTransitionEnd prefix.
Note: The addEventListener() method is not supported in Internet Explorer 8 and earlier versions.
Bubbles: | Yes |
---|---|
Cancelable: | Yes |
Event type: | TransitionEvent |
DOM Version: | Level 3 Events |
CSS Tutorial: CSS3 Transitions
CSS Reference: CSS3 transition Property
CSS Reference: CSS3 transition-property Property