Jump to content
Search Community

Horizontal Scroll ScrollTrigger, need review

krisxtina test
Moderator Tag

Recommended Posts

Hello. I`m enough new in using gsap. I need your review please, because I have doubt about the implementation of idea.
So, my idea: I need two sections of 100vh horizontally scrolled, then I have section #3 (projects) that has own height, after that I want two sections of 100vh horizontally scrolled. I did this, but I`m not sure that it is clear and css is right. Thank you for your attention :) 

image.png

See the Pen KKyVRQg by Kisa777Zaika (@Kisa777Zaika) on CodePen

Link to comment
Share on other sites

5 hours ago, GreenSock said:

Hi @krisxtina. I didn't quite understand what you're asking - can you clarify? It looked to me like everything was working as expected. What exactly is the problem? I don't see any flashes in Chrome at all. Not even one. How can we reproduce? 

Hi. I want that someone who is good in gsap see that my code is clear, please. No problem, just have doubt about correct code writing :) 

Link to comment
Share on other sites

I don't see any obvious problems. You could simplify things with a .forEach() loop so that you don't have to manually create a new one for each section or add a distinct class to each one. But that's just about simplification - it's not that there was something "wrong" in your code. I personally would reduce the "end" value a bit so that it doesn't take so long to scroll through those sections, but that's totally a personal preference. 

  • Like 1
Link to comment
Share on other sites

13 hours ago, GreenSock said:

I don't see any obvious problems. You could simplify things with a .forEach() loop so that you don't have to manually create a new one for each section or add a distinct class to each one. But that's just about simplification - it's not that there was something "wrong" in your code. I personally would reduce the "end" value a bit so that it doesn't take so long to scroll through those sections, but that's totally a personal preference. 

Thank you!

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