vadnica-logo
X

JavaScript HTML DOM Events: animationiteration

The animationiteration event occurs when an animation defined with @keyframes finishes one cycle and begins the next. In the example below, each animation repeat increments a counter and logs the time and iteration number.

EXAMPLE
RESULT

Every iteration triggers this event, allowing you to use it for:

  1. counting how many times the animation has already run;
  2. updating the UI (e.g., changing text, colour, or other properties) between iterations;
  3. creating sequential effects that fire after each iteration.

Thank you for visiting! Adding privacy policy.

© 2024 All rights reserved.

Vam je koda pomagala? Če želite podpreti moj trud pri pripravi vodičev in vzdrževanju strani, mi lahko namenite donacijo za kavo.