+ 1
Is there a method to apply javascript on sprite.svg file components?
I have a bundle of SVG components in my sprite.SVG file and an HTML page where I am including those SVG components here in HTML. eg: <svg class="svg-icon"> <use xlink:href="sprite.svg#hiw-svg"></use> </svg> Now, I want to apply javascript on the components of SVG's which I included, So how should I do that since those components are defined in the sprite.SVG file. One possible solution is that I include those sprite symbols directly as SVG in my HTML but I don't want to do that as I have lots of SVG's which will take a lot of space in HTML. So what is the best way I can apply GreenSock js or simply (JS) for animations on the sprite.SVG file.
1 Odpowiedź
+ 1
You Can Check It Here: http://thenewcode.com/1094/Using-JavaScript-in-SVG