Jump to content
Search Community

stagger in array

TrulyNewbie test
Moderator Tag

Recommended Posts

Stagger won't work with a single element, which is what your loop is providing. You can use delay to get the same effect. 

 

gsap.utils.toArray(".work-h1").forEach((text, i) => {
  gsap.from(text, {
    scrollTrigger: {
      trigger: text,
      start:"-10px top"
    },
duration: 3, ease: "expo.out", yPercent: -100,transformOrigin: "top left", rotation: -10, delay: i * 0.2, 
  });
});

 

  • Like 2
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.
×
×
  • Create New...