Hi,
I am trying to add scrolltrigger to the follow Id (which i made sure occurs only once in the code), but the are multiple start and stop triggers getting created.
I am not sure what is that i am doing wrong here
useLayoutEffect(() => {
gsap.registerPlugin(ScrollTrigger);
const tl = gsap.timeline({
scrollTrigger: {
trigger: '#custom-page-footer',
start: 'top center',
end: '+=100',
scrub: true,
markers: true,
toggleActions: 'play reverse play reverse',
}
})
tl.to('.nav-cta-join-the-fast-lane', {
opacity: 0,
duration: 0.1
})
tl.to('.nav-gushwork-logo', {
opacity: 0,
duration: 0.1
})
})
Later on the page...