Jump to content
Search Community

Alexander123

Members
  • Posts

    1
  • Joined

  • Last visited

Alexander123's Achievements

  1. Hello all. I am quite new to GSAP and apologize if this is a stupid question. I'm using TranslateY to on content below my hero section to quickly move it up past the hero as it fades out. Because of this, other sections that rely on the trigger at a certain point are off because of the -15% I'm translating a div. The HTML is essentially: <div> <section id="hero"></section> <div id="below-hero"> <!-- rest of page content --> <div></div> <div></div> </div> </div> My GSAP: gsap.to('#below-hero', { scrollTrigger: { trigger:'#hero', start:'bottom bottom', toggleActions: "restart pause reverse pause", scrub:1 }, yPercent:-15, opacity:1, duration:2 }); The way the #below-hero div flows into the hero as it fades out looks good, however, I'm wondering if this is a flawed way of achieving what I wanted? Now every section is off by the percentage in terms of the trigger. How can I fix this the "correct" way?
×
×
  • Create New...