gsap.registerPlugin(ScrollTrigger);
let tl = gsap.timeline();
let bulletLi = jQuery('.slider li');
bulletLi.each(function(e){
tl.to(this, { duration: 3, x: 0, opacity: 1 })
})
let st = ScrollTrigger.create({
animation: tl,
trigger: '.js-bullet-info',
start: "top top+=10",
end: "bottom top",
scrub: 2,
pin: true,
})
Hi all. I need a help on animating one element at a time. When I scroll faster it animating all the elements continuously. I need to animate each element on each scroll. How can I do this.
Thank you.