NewBeee Posted January 29 Share Posted January 29 Hi everyone, Sorry if this is a basic question, am newbie to JavaScript & GSAP, just trying a project to learn. My issues is when I try to use same component multiples time on same page, pin is not working. Its working for the 1st instance, but from 2nd instance its not working. Tried searching multiple forums & not sure what I'm doing wrong. Pin not working in multiple instances (codepen.io) Thanks in advance. See the Pen MWxrZGE by OrphanX (@OrphanX) on CodePen Link to comment Share on other sites More sharing options...
GreenSock Posted January 30 Share Posted January 30 I'm not quite sure what you're trying to do because your demo was tweening ".pin-text" but there was no such element, and you were animating from opacity: 1 to opacity: 1 which does absolutely nothing. So I assume you only wanted to pin the element (no animation)? You can just do this: See the Pen YzgYoyx by GreenSock (@GreenSock) on CodePen The key is to just loop through the elements and create one for each. I hope that helps! 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