Hi there,
I'm trying to trigger some additional javascript within the `onComplete` callback on stagger within ScrollTrigger.batch().
I found this thread but `this` is undefined when I put it inside a batch call like so:
ScrollTrigger.batch('.show', {
onEnter: (elements, triggers) => {
gsap.to(elements, { y: 0, opacity: 1, duration: 1, stagger: {
each: 0.3,
onComplete: () => {
console.log(this)
}
} })
},
})
Is there any way I can I can access the element when its animation has finished?
Thanks in advance,
Tom.