Animation callbacks
Execute functions at specific points during an animation playback.
Callbacks Function
are specified directly in the animate()
parameters Object
.
animate('.square', {
translateX: 100,
scale: 2,
opacity: .5,
duration: 400,
delay: 250,
ease: 'out(3)',
loop: 3,
alternate: true,
autoplay: false,
┌─────────────────────┐
│ onBegin: () => {}, │
│ onLoop: () => {}, ├─ Callbacks
│ onUpdate: () => {}, │
└─────────────────────┘
});
In this section