on-*-complete-*
Attach behaviour to the moment an animation finishes. The class names a handler registered via registerComplete (or a window function), optionally pointing at another animation instead.
Syntax
on-spawn-complete-<fn>fn(el) when a spawn finisheson-loop-complete-<fn>each cycle of a loop / its completionon-click-complete-<fn>when a click animation finishes…complete-anim-<name>plays animation `<name>` once instead of calling fncomplete-time-Nduration override for the triggered animcomplete-delay-Ndelay override for the triggered animhtml
<div class="appear spawn-fade time-1 on-spawn-complete-docsPing">…</div>
<div class="appear spawn-up on-spawn-complete-anim-shake complete-time-1">…</div>Live demo
Both boxes register their completion through the shared docsPing handler. Re-mount them and watch the stamps.
on-spawn-complete-docsPing
waiting…
timeline + complete hook
waiting…
Infinite loops can never "complete", so loop handlers fire on onRepeat - every cycle - while finite animations use their real onComplete.