Jump to content
Search Community

Horizontal scroll glitchy animation while scrolling

Yagnik Patel test
Moderator Tag

Recommended Posts

Hello Community. First of all, thank you very much for this very beautiful platform. I am very new and first time posting a question and sorry If I make any mistakes. I found one codepen as per my requirement but I found one issue in it. While scrolling in the horizontal section there is some glitch in the last section it distorts for a fraction. Help is appreciated. Please check the scroll between Horizontal 1 and Horizontal 2 sections.  Here is the pen and loom link also.

 https://www.loom.com/share/d089bea672d7443d8af6394175f91f66?sid=ee6348c6-754d-479c-9cd4-784a8ff4d331

See the Pen bGZpzRx by Yagnikpatel (@Yagnikpatel) on CodePen

Link to comment
Share on other sites

Hi @Yagnik Patel while working with frameworks you can use  Stackblitz starter templates to create your demos it will be easier, 

 

also here is a working demo for snapping vertically and horizontally

See the Pen eYrOObw?editors=0010 by GreenSock (@GreenSock) on CodePen

because in your demo a lot of things were going on and this handleScroll function you created and playing on window scroll event looks sus to me ?

 

and since you are working with react you can use the useGSAP hook https://github.com/greensock/react

 

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