Jump to content
GreenSock

omi

scroll trigger do not work correctly

Recommended Posts

i want to pin the hero section until the logo scale to full window width but i don't know why the logo scale don't work correctly. please assist me to find the issue

See the Pen rNvpmwg by omi-bhatia (@omi-bhatia) on CodePen

Link to comment
Share on other sites

Your end trigger is above your start trigger. So as soon as the animation is ready to play it is already finished, so that is why it jumps to 100%. I think you want to use endTrigger: instead of end: because you've given it a element instead of a number or the other properties, check the docs for more info on the properties

 

Also your .hero element gets pinned and loses it's padding or something. I've given it a margin-top instead, but now it starts way lower, but it doesn't jump when it gets pinned. There is a lot of  code in your minimal demo, we ask for minimal demo's with a few lines of code and some colored divs, because they are way easier for someone to jump in to.

 

See the Pen PoeEOxv?editors=0010 by mvaneijgen (@mvaneijgen) on CodePen

 

  • Like 2
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×