i_dont_understand_gsap
Content Type
Profiles
Forums
Store
Blog
Product
Showcase
FAQ
Downloads
Posts posted by i_dont_understand_gsap
-
-
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...
See the Pen endpage.js,pages by edit (@edit) on CodePen
Multiple scroll triggers getting created
in GSAP
Posted
Hi,
GSAP ScrollTrigger NextJS Starter (forked) - StackBlitz
If you see this stackblitz, the trigger markers are way beyond the "EndPage" component.
I know this is not the exact problem, but it is part of the problem.