views:

50

answers:

1

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?

A: 

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
Tim