Jump to content
Search Community

i_dont_understand_gsap

Members
  • Posts

    2
  • Joined

  • Last visited

Posts posted by i_dont_understand_gsap

  1. 1 hour ago, GSAP Helper said:

    It's pretty tough to troubleshoot without a minimal demo - the issue could be caused by CSS, markup, a third party library, your browser, an external script that's totally unrelated to GSAP, etc. Would you please provide a very simple CodePen or CodeSandbox that demonstrates the issue? 

     

    Please don't include your whole project. Just some colored <div> elements and the GSAP code is best (avoid frameworks if possible). See if you can recreate the issue with as few dependancies as possible. If not, incrementally add code bit by bit until it breaks. Usually people solve their own issues during this process! If not, then at least we have a reduced test case which greatly increases your chances of getting a relevant answer.

     

    Here's a starter CodePen that loads all the plugins. Just click "fork" at the bottom right and make your minimal demo

     

     

    If you're using something like React/Next/Vue/Nuxt or some other framework, you may find StackBlitz easier to use. We have a series of collections with different templates for you to get started on these different frameworks: React/Next/Vue/Nuxt.

     

    Once we see an isolated demo, we'll do our best to jump in and help with your GSAP-specific questions. 

     

    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.

  2. 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
        })
      })

     

    Screenshot 2023-06-01 at 7.41.10 PM.png

     

    Later on the page...

     

    Screenshot2023-06-01at8_40_30PM.thumb.png.32d710247cdf0bd9162f261b6776f863.png

    See the Pen endpage.js,pages by edit (@edit) on CodePen

×
×
  • Create New...