Jump to content
Search Community

ScrollTrigger with scrollTo

apostopher
Moderator Tag

Go to solution Solved by Cassie,

Recommended Posts

Posted

I'm trying to use scrollTrigger along with navigation links. when i load the page and click the navigation link (e.g panel 4) it correctly animates to panel 4. However if i click another link after that (e.g Panel 3) the scrollTrigger does not scroll correctly. when i click `panel 1` it animates to `panel 2`.

 

I think i have configured the scroll trigger incorrectly. can someone pls help me?

See the Pen jOLPzQG by apostopher (@apostopher) on CodePen.

Posted
18 minutes ago, Cassie said:

Hi Apostopher

Because of the layered pinning the calculated height of the target link is a bit off.

If you do a calculation instead it work!

Thanks for being part of club GreenSock ?
 

 

 

Thanks a lot @Cassie 

  • Like 1

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.
×
×
  • Create New...