Commit ec005c76 authored by Antoine-Gelgon's avatar Antoine-Gelgon
Browse files

[visible langage] -> load svg to page

parent d487da3e
$(document).ready(function(){
let urlMd = 'http://pads.osp.kitchen/p/collaboration-agreement/export/txt'
let dt = $.get(urlMd)
......@@ -12,10 +11,25 @@ $(document).ready(function(){
compt++
})
// let imgs = $('img')
// imgs.each(function(){
// let src = $(this).attr('src')
// })
let imgs = $('img')
imgs.each(function(){
let src = $(this).attr('src')
let ext = src.substring(src.lastIndexOf(".")+1)
if (ext == 'svg') {
loadSvg($(this), src)
}
})
})
})
function loadSvg(svg, src) {
var svg_content = $.ajax({type: "GET", url: src, async: false}).responseText;
console.log(svg_content)
console.log(svg_content.responseText)
svg.wrap('<div class="svg" >'+ svg_content+'</div>')
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment