jQuery SVG copy path to another SVG
How can I copy a path or a group out of an SVG-document loaded to the DOM with http://keith-wood.name/svg.html into a new SVG?
I want to show thumbnails of the different elements.. every element got its own id开发者_开发技巧, I tried the add-method but nothing happens.
Anyone got an idea?
Got it, loop torugh each element of the "big" svg and do this with every element:
$('#mini_'+$(this).attr('id')).svg(); //prepared divs for the thumbnail
var mini_svg = $('#mini_'+$(this).attr('id')).svg('get'); //get the svg
mini_svg.add(svg.getElementById($(this).attr('id'))); //add the element
精彩评论