Jump to content
Search Community

Horizontal and vertical scroll with navigation links problem

Anastasio test
Moderator Tag

Go to solution Solved by OSUblake,

Recommended Posts

Hello there.
i'm a gsap newbie and this is my first post on gsap forum, thank you in advance for your help.

 

I have horizontal container, that can simulate horizontal scroll, with dynamic sections that not have defined width and normal vertical sections.

I've spent a lot of time trying to implement navigation between horizontal and vertical sections with anchor links but i haven't no results.

The example here

See the Pen a82e21f8d9c7bce0059159ced099666d by akapowl (@akapowl) on CodePen

seems to not work for me.
 

Someone can help me to make it work?

See the Pen ExopjXm by andreaemm (@andreaemm) on CodePen

Link to comment
Share on other sites

9 minutes ago, Cassie said:

Hello there!

 

That demo doesn't have mixed vertical and horizontal sections like yours.

Maybe this demo will be more helpful.

 

 

 

Thank you, but this example have sections with full width, my sections have dynamic width, you can't know how much larger they will be.

Link to comment
Share on other sites

13 minutes ago, Cassie said:

Ah yes! How about this one.
 

 

Oh i think this might help, but i've found out a solution by myself, thank you anyway!

I have another weird behavior; when the window has been scrolled and after resized, the start and end point of scroll trigger breaks.
A temporary solution,  i used to manage the issue, is to add a resize event listener and when window is resized i disable and re-enable the scroll trigger. This works, but every time i resize the window scroll to the top.
I already tried to use .refresh() but this doesn't help.

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...