Jump to content
GreenSock

momo12

Stagger is not working

Go to solution Solved by Rodrigo,

Recommended Posts

  • momo12 changed the title to Stagger is not working
  • Solution

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!!!

  • Like 3
Link to comment
Share on other sites

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×