Commit 5eee99e5 authored by Antoine-Gelgon's avatar Antoine-Gelgon
Browse files

[visual-langage] add visuals balsa

parent e4d3152c
This diff is collapsed.
This diff is collapsed.
$(document).ready(function(){
let urlMd = 'http://pads.osp.kitchen/p/collaboration-agreement/export/txt'
let dt = $.get(urlMd)
$.get( urlMd, function( data ) {
......@@ -14,22 +17,21 @@ $(document).ready(function(){
let imgs = $('img')
imgs.each(function(){
let src = $(this).attr('src')
let clss = $(this).attr('alt')
let ext = src.substring(src.lastIndexOf(".")+1)
if (ext == 'svg') {
loadSvg($(this), src)
loadSvg($(this), src, clss)
}
})
})
})
function loadSvg(svg, src) {
function loadSvg(svg, src, clss) {
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>')
svg.wrap('<div class="svg ' + clss + '" >'+ 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