Nora Posted July 4, 2022 Share Posted July 4, 2022 I'm working on GSAP and I have two elements in different pages have same class and I want to apply on them animation using scrollTrigger when I reach to the element...if there a way I can do this in on function instead of given to them a specific class and repeating my self? See the Pen XWEmeJQ by noX10M (@noX10M) on CodePen Link to comment Share on other sites More sharing options...
Solution GreenSock Posted July 5, 2022 Solution Share Posted July 5, 2022 If I understand you correctly, sure, just use a .forEach(): See the Pen ZExbawK?editors=1010 by GreenSock (@GreenSock) on CodePen 1 Link to comment Share on other sites More sharing options...
Nora Posted July 5, 2022 Author Share Posted July 5, 2022 Yes, that's what I want.. THANK YOU! 1 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