HTML ontransitionend Event Attribute
Description
The ontransitionend event attribute runs a script when a CSS transition has completed. It does not fire if the transition is interrupted, for example if the property changes back before the end or the element is hidden; in that case transitioncancel fires instead. It is commonly used to clean up after an animated change, such as removing an element that has faded out.
The event is a TransitionEvent with the properties propertyName (the CSS property, for example "transform"), elapsedTime (in seconds, not counting transition-delay) and pseudoElement. A separate event fires for each transitioned property, so a transition on all that changes three properties fires three events; check event.propertyName to handle only one. Transition events bubble.
Syntax
<element ontransitionend="script">
Values
- scriptThe name of the script to use when the event has been triggered.
Example
Browser Support
The following information will show you the current browser support for the HTML ontransitionend event attribute. Hover over a browser icon to see the version that first introduced support for this HTML event attribute.
Desktop





Tablets & Mobile





