Jump to content
Search Community

Horizontal Panel scrollTrigger and ScrollToPlugin anchor clicking snaps to another section.

deepus7581 test
Moderator Tag

Go to solution Solved by Cassie,

Recommended Posts

Thanks OSUblake ,

I already saw the pen you mentioned , my sections was mixed vertical and horizontal sections like this pen  and some of links from another vertical  sections to horizontal sections so i was not getting correct postions of scrollto element . and i dont understand how section links working in this demo  ,  so i skipped this 

See the Pen xxEQNBB by GreenSock (@GreenSock) on CodePen

. now i checked again and i figured how to scroll to x y position . But still I have one doubt not solved, how to link single menu or link ( like a read more button ) from another vertical section target to specific horizontal section .
 

I got  demo Anchor navigation to ScrollTriggered (horizontal) section  from https://greensock.com/st-demos/?d=19 , not from another thread . 
 

Link to comment
Share on other sites

I fixed the CodePen - there were some calculations that were slightly off. Plus inertia could push the scroll past where it would land, and bounce back, so the snapping was happening when it was just a tad further than it would land. If you removed snapping altogether, you'd see that it was landing about 7 pixels past where it should which is why the directional snapping kicked in. 

 

It should all be resolved now. 👍

  • Like 1
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...