Poseidon Posted September 18, 2022 Share Posted September 18, 2022 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 More sharing options...
Poseidon Posted September 18, 2022 Author Share Posted September 18, 2022 Updated the codepen See the Pen PoemWpp by thecodenaut (@thecodenaut) on CodePen Managed to almost resolve this using onEnter, however now looks like there is empty position created between first and second slide element... I am pretty sure I am doing something wrong, if someone could point me in right direction would be nice Link to comment Share on other sites More sharing options...
Solution GreenSock Posted September 18, 2022 Solution Share Posted September 18, 2022 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! 1 Link to comment Share on other sites More sharing options...
Poseidon Posted September 18, 2022 Author Share Posted September 18, 2022 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 More sharing options...
GreenSock Posted September 19, 2022 Share Posted September 19, 2022 Nah, there are no "stupid" questions in the GreenSock forums! We're all on a learning journey. Glad you got it figured out. 👍 1 Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now