Simple script that inject SVG content to HTML.
The purpose of the script is to handle SVG stuff that you want to put inline. For instance set of icons that you want to style and add interactive stuff. This possible only with inline SVG, but this way it's exorbitantly bloat your html code. Script do the one thing: insert SVG inline when DOM is loaded.
How to use
- Add class name to the selector
- Paste SVG code to the function SVG will be inserted to all containers with corresponding class name.
It's can be useful for complex icon sets that can be stored in one JS file. This also reduces server requests because only one JS file loeaded once.