iconic / SVGInjector

Fast, caching, dynamic inline SVG DOM injection library
MIT License
975 stars 145 forks source link

SVG Stack compatibility #15

Open tomagladiator opened 10 years ago

tomagladiator commented 10 years ago

Hello,

Like this exemple : http://jsfiddle.net/24DNn/5/ It's possible to stack a lot of svg inside an other svg, like a sprite.

Nevertheless, SVGInjector doesn't work if we add a target "#IDofMySvg" at the end of the URL. exemple: " img class="inject-svg" src="/images/sprite.svg#logo" "

My project have more than 150 svg and I really need to use Stack.

Have you an idea ? Thanks !

cooldrool commented 9 years ago

I would like to have this feature too!

This way I could make sure all my icons are cached when first visiting the site

ghost commented 9 years ago

I'd really like that feature too. It is the last requirement I need to meet for my use case :-)

Thanks.

markadrake commented 8 years ago

I'm wondering if anyone has started working on this functionality already. I have a more immediate need and SVGInjector is the library that is farthest along in features. I'll take a look at this library tomorrow and see if I can make the change for you.