This package has been deprecated
Author message:
Use svg-to-inline instead, see https://github.com/tiagoporto/svg-to-inline.
jquery-svg-to-inline
0.1.4 • Public • Published jQuery SVG to inline
A jQuery plugin to replace and embedding SVG inline.
Table of Contents
Examples
<object class="svg myClass" type="image/svg+xml" data="htts://somesvg.svg"></object>
or
<img src="https://somesvg.svg" class="svg myClass otherClass">
Will generate
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" class="myClass otherClass">
<circle cx="50" cy="50" r="50"/>
</svg>
Usage
$( ".svg" ).svgToInline();
Options
useTriggerClass
By default the trigger class will isn't used on inline svg. If you want use set to true
.
$( ".svg" ).svgToInline({useTriggerClass: true});
Example
<img src="https://somesvg.svg" class="svg myClass otherClass">
Will generate
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" class="svg myClass otherClass">
<circle cx="50" cy="50" r="50"/>
</svg>
License
Jquery SVG to inline is released under the terms of the MIT license.
Package Sidebar
Install
npm i jquery-svg-to-inline
Weekly Downloads