Share Posted September 22, 2022 Hi guys, I have a problem. The stagger of mouseout works but the mouseover stagger is not working! See the Pen bGMrYgp by talewoy290 (@talewoy290) on CodePen Link to comment Share on other sites More sharing options...
Solution Solution Share Posted September 22, 2022 Hi, It is actually working, we just can't see it The issue is that it starts from the first image that is at the bottom of the stack of images. But lucky for us GSAP has advanced staggers that help you with this: el.addEventListener("mouseover", (e) => { gsap.to(".first", { scale: 0.5, duration: 0.6, stagger: { each: 0.1, from: "end" } }); }); See the Pen gOzxvGQ by GreenSock (@GreenSock) on CodePen Happy Tweening!!! 3 Link to comment Share on other sites More sharing options...
Author Share Posted September 22, 2022 9 minutes ago, Rodrigo said: Hi, It is actually working, we just can't see it The issue is that it starts from the first image that is at the bottom of the stack of images. But lucky for us GSAP has advanced staggers that help you with this: el.addEventListener("mouseover", (e) => { gsap.to(".first", { scale: 0.5, duration: 0.6, stagger: { each: 0.1, from: "end" } }); }); Happy Tweening!!! Thanks man. You are a GSAP super hero. 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