Nos bénévoles n'ont pas encore traduit cet article en Français. Inscrivez-vous et aidez-nous à réaliser cette tâche !
Vous pouvez également lire cet article en English (US).

The animationend event is fired when a CSS Animation has completed (but not if it aborts before reaching completion, such as if the element becomes invisible or the animation is removed from the element).

Bubbles Yes
Cancelable No
Interface AnimationEvent
Event handler property onanimationend

The original target for this event is the Element that had the animation applied. You can listen for this event on the Window interface to handle it in the capture or bubbling phases. For full details on this event please see the page on HTMLElement: animationend.

Examples

This example listens for the animationend event:

document.addEventListener('animationend', () => {
  console.log('Animation ended');
});

The same, but using the onanimationend event handler property:

document.onanimationend = () => {
  console.log('Animation ended');
};

See a live example of this event.

Specifications

Specification Status Comment
CSS Animations Working Draft Initial definition

Browser compatibility

Update compatibility data on GitHub
DesktopMobile
ChromeEdgeFirefoxInternet ExplorerOperaSafariAndroid webviewChrome for AndroidFirefox for AndroidOpera for AndroidSafari on iOSSamsung Internet
animationend eventChrome Full support 43Edge ? Firefox Full support YesIE ? Opera Full support 30Safari ? WebView Android Full support 43Chrome Android Full support 43Firefox Android Full support YesOpera Android Full support 30Safari iOS ? Samsung Internet Android ?

Legend

Full support  
Full support
Compatibility unknown  
Compatibility unknown

See also

Étiquettes et contributeurs liés au document

Contributeurs à cette page : wbamberg, mdnwebdocs-bot, mfuji09
Dernière mise à jour par : wbamberg,