Ling Li Posted August 22, 2022 Share Posted August 22, 2022 Hi, I'm trying to animate an object that I have created using svg path. The path is wrapped around a "g" group with a class attached to it. In the example code pen, I can animate the circle, but the custom object does not animate. What am I doing wrong? I'm a registered greenshock member, so do let me know if I need to use a specific plugin for this work? Thanks, Ling See the Pen MWVzzoR by lingster (@lingster) on CodePen Link to comment Share on other sites More sharing options...
Solution mvaneijgen Posted August 22, 2022 Solution Share Posted August 22, 2022 Hi @Ling Li welcome to the forum! You don't need to target the attr, they are exposed directly within GSAP. There is also no need to call tl.play(), the timeline plays automatically if you do not define otherwise. A few other things Your closing </g> tag was outside the </svg> There was an x="0" attr on your circle, with didn't do anything See the Pen bGvZByp?editors=1011 by mvaneijgen (@mvaneijgen) on CodePen 1 Link to comment Share on other sites More sharing options...
Ling Li Posted August 22, 2022 Author Share Posted August 22, 2022 @mvaneijgen many thanks for the prompt reply and for pointing out the errors in my setup! 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