load svg safe as xml and inject it in html
function loadSvg(selector, url) {
console.log('kshd')
var target = document.getElementById(selector);
// If SVG is supported
if (typeof SVGRect != "undefined") {
// Request the SVG file
var ajax = new XMLHttpRequest();
ajax.open("GET", url + ".svg", true);
ajax.send();
// Append the SVG to the target
ajax.onload = function(e) {
target.innerHTML = ajax.responseText;
}
} else {
// Fallback to png
target.innerHTML = "<img src='" + url + ".svg' />";
}
}