AnimationEvent animationName Property
Definition and Usage
When an animation event occurs, the animationName property returns the name of the animation.
The name of the animation is a CSS property animation-name Value.
This property is read-only.
Example
Get the animation name associated with the animation:
var x = document.getElementById("myDIV"); x.addEventListener("animationstart", myStartFunction); function myStartFunction(event) { this.innerHTML = "Animation-name is: " + event.animationName;
Syntax
event.animationName
Technical Details
Return Value: | A string value representing the name of the animation. |
---|
Browser Support
The numbers in the table indicate the first browser version that fully supports this property.
Property | Chrome | IE | Firefox | Safari | Opera |
---|---|---|---|---|---|
animationName | Support | 10.0 | 6.0 | Support | Support |
Related Pages
HTML DOM Reference Manual:animationstart Event
HTML DOM Reference Manual:animationiteration Event
HTML DOM Reference Manual:animationend Event
HTML DOM Reference Manual:AnimationEvent elapsedTime Attribute
CSS Reference Manual:CSS3 Animation Attribute
CSS Reference Manual:CSS3 animation-name Attribute