celli Posted May 29, 2020 Share Posted May 29, 2020 Hi, I animated an inline SVG with GSAP and it works really well—but now I am thinking that maybe I'd like to reference the SVG and not have the SVG inline because my HTML document get's pretty long. Is there a best approach with GSAP 3 to reference the IDs and classes within the SVG file, or best practices to use in general that would work cross browser ? I have a lot of IDs to reference, so I'm just wondering if there is a best approach to keep my GSAP code intact See the Pen JjYgGRG by celli (@celli) on CodePen Link to comment Share on other sites More sharing options...
ZachSaucier Posted May 29, 2020 Share Posted May 29, 2020 Hey celli. You've already asked about this Nothing has changed. You can only animate components of SVGs if they're inline, if you load them via a request and put them inline, or if you use an <object> tag. 3 Link to comment Share on other sites More sharing options...
celli Posted May 29, 2020 Author Share Posted May 29, 2020 Great, thanks Zach! Just was wondering if something maybe has changed since. 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