animationiteration Event in JavaScript
animationiteration Event in JavaScript
The animationiteration event is used to occur when CSS animation is repeated. This event will not work if animation-iteration-count property is set to 1. For this event to fire, the animation needs to run more than once. Three events occur when a CSS animation plays. These are:-
- animationstart i.e, when the CSS animation has started
- animationiteration i.e, when the CSS animation is repeated
- animationend i.e, when the CSS animation has completed
Syntax:-
Its syntax is:- object.addEventListener("webkitAnimationIteration", myFunction) OR object.addEventListener("animationiteration", myFunction)