Share Posted April 26, 2017 Seen in the codepen: As soo as I pass an array as element in a .stagger-Tween, the individual .box'es get ignored and all move as a whole. .staggerTo(".box", ... // each .box moves! Nice! .staggerTo([".box", ".box2"], ... // .box'es move as a whole // What to do?! Is there a neat GSAP syntax I do not know about or is the only solution to loop manually? See the Pen bWBZwa by katerlouis (@katerlouis) on CodePen Link to comment Share on other sites More sharing options...
Share Posted April 26, 2017 Hi kreativzirkel, Try it with: See the Pen wdoZqZ by mikeK (@mikeK) on CodePen 6 Link to comment Share on other sites More sharing options...
Share Posted April 26, 2017 If you're trying to make two groups that stagger their elements at the same time, I'd write it like Manfred did in his fork. If you want the .box and .box2 classes to all be part of of one array, you can write it like this: TweenMax.staggerTo(".box, .box2", 1, { y: "+=30" }, .2); Happy tweening. 5 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