Jump to content
Search Community

ScrollTrigger show first section automatically

Poseidon test
Moderator Tag

Go to solution Solved by GreenSock,

Recommended Posts

Hello everyone, trying to create a projects showing section using scrollTrigger demo code, if you check the attached pen, you'll see that first section is not visible until you scroll.

 

Need some help making first section of projects appear automatically when top of .blocks reaches top of viewport (can't understand how to achieve it) 😕 any help appreciated.

See the Pen PoemWpp?editors=0010 by thecodenaut (@thecodenaut) on CodePen

Link to comment
Share on other sites

  • Solution

Maybe this is what you want?

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

 

You might be able to simplify things by just putting all your sliding animations into a single timeline rather than creating a whole different timeline and ScrollTrigger for every one. Then just scrub that one timeline across the whole thing. 

 

Good luck!

  • Like 1
Link to comment
Share on other sites

8 minutes ago, GreenSock said:

Maybe this is what you want?

 

 

 

You might be able to simplify things by just putting all your sliding animations into a single timeline rather than creating a whole different timeline and ScrollTrigger for every one. Then just scrub that one timeline across the whole thing. 

 

Good luck!

 

Thank you very much!!! Sorry for such stupid question, still learning JS and wasn't even aware of .slice()

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