DanielLav Posted March 3, 2023 Share Posted March 3, 2023 Hello! I'm just learning GSAP and my question may seem simple. I have 4 elements with the same class and I want them to appear one after the other in my timeline. Now I'm trying to make it an array, but they still appear at the same time. Please help me solve what seems to me not a difficult problem. And tell me where I went wrong I attach link to codepen example: See the Pen ExemGwZ by ProjectDCL (@ProjectDCL) on CodePen Link to comment Share on other sites More sharing options...
Solution GreenSock Posted March 3, 2023 Solution Share Posted March 3, 2023 Welcome aboard, @DanielLav! It's actually a lot simpler than you may have expected - just use the "stagger" property: See the Pen GRXmPYP by GreenSock (@GreenSock) on CodePen More about staggers: https://greensock.com/docs/v3/Staggers By the way, autoAlpha is exactly the same thing as animating "opacity" but it ALSO toggles the "visibility" property to "hidden" when it hits 0. So you definitely don't need to animate both opacity and autoAlpha. Happy tweening! Link to comment Share on other sites More sharing options...
DanielLav Posted March 3, 2023 Author Share Posted March 3, 2023 Thanks a lot my friend! It's completely solve my problem 1 Link to comment Share on other sites More sharing options...
GreenSock Posted March 3, 2023 Share Posted March 3, 2023 Anytime. Happy to help. 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