Jump to content
Search Community

ScrollTo in horizontal ScrollTrigger problem

gn90 test
Moderator Tag

Go to solution Solved by GreenSock,

Recommended Posts

Hi there,

 

so i am quite new to the GSAP community but so far i created a few, cool small things. Since yesterday i struggle with the scrollto functionality. I discovered in other posts of this forum how to do it (also with a fixed navigation on the left side). In every section i have some "prev" and "next" buttons. As u can see it always scrolls to the end of the page if u click them. I am not really that good in plain javascript so its quite hard for me to understand the target calculation i copied from another post. I just thought it would be enough to set the element as target. But i guess since we are in a horizontal scrolltrigger it handles it different.

 

Thanks in advance,

Gui

See the Pen KKZBprM by gn90at (@gn90at) on CodePen

Link to comment
Share on other sites

Thank you for your reply. It works waay better now due to this function. But still not perfect. Could it be because of my fixed navigation on the left thats overlapping? Is there a way to include this in the calculations?

 

Thank you,

Gui

 

 

 

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