TrulyNewbie Posted July 28, 2021 Share Posted July 28, 2021 Hi, I want to stagger each h5 in an array, but it doesn't seem to work. Please can you show me where am I going wrong? See the Pen XWREmON by NewbieRuby (@NewbieRuby) on CodePen Link to comment Share on other sites More sharing options...
OSUblake Posted July 28, 2021 Share Posted July 28, 2021 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, }); }); 2 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