jquery.replacesvg.js is a simple svg replacement plugin.
http://fingaholic.github.com/jquery.replacesvg/
- defaultsvg
BooleanIf the value of the src attributes is the svg, set to true. If not, set to false. (default value is false) - dataname
StringData attribute name for getting alternative image path (default value is 'altimgsrc'). - ns
StringSpecifies the namespace URI (default value is 'http://www.w3.org/2000/svg').
<img src="./img/star.svg" width="100" height="95" alt="star" data-altimgsrc="./img/star.png" class="js-replacesvg">$('.js-replacesvg').replacesvg();jQuery 1.7.x or later.
IE6+ and other new browsers.
Licensed under the MIT license.