GET an SVG file as a string from JavaScript GET an SVG file as a string from JavaScript ajax ajax

GET an SVG file as a string from JavaScript


$.get('/vectorimage.svg', function(svg){    console.log( svg );}, 'text');


Try this

    $.get('/vectorimage.svg', function(svg){        console.log($(svg).html());    });