sak Posted July 18, 2023 Share Posted July 18, 2023 This code doesn't work as the 'index' variable is not defined, what is the best way to go about it? timeline.from([...featureCards], { opacity: 0, y: 60 * Math.pow(-1, index), ease: "power3.out", duration: 0.7, stagger: 0.3, }); Link to comment Share on other sites More sharing options...
Solution sak Posted July 18, 2023 Author Solution Share Posted July 18, 2023 My bad, figured it out from the docs - timeline.from([...featureCards], { opacity: 0, y: (idx) => 60 * Math.pow(-1, idx), ease: "power3.out", duration: 0.7, stagger: 0.3, }); 1 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