Skip to content

Instantly share code, notes, and snippets.

View benjamenjohnsondev's full-sized avatar
🚀
array[role: FullStack, BE: PHP, FE: JavaScript]

Ben Johnson benjamenjohnsondev

🚀
array[role: FullStack, BE: PHP, FE: JavaScript]
View GitHub Profile
@benjamenjohnsondev
benjamenjohnsondev / svg.js
Created August 16, 2017 14:25 — forked from cod3cow/svg.js
Replace all SVG images with inline SVG using jQuery
/*
* Replace all SVG images with inline SVG
*/
jQuery('img.svg').each(function(){
var $img = jQuery(this);
var imgID = $img.attr('id');
var imgClass = $img.attr('class');
var imgURL = $img.attr('src');
jQuery.get(imgURL, function(data) {