I would like to select the last path in SVG and delete it. I tried various methods, in pure javascript and in jquery, and I seem to be unable to access the SVG correctly or its path.
HTML:
<div id="thesvgwrapper"> <svg id="thesvg"...><path ....></path><path ...></svg> </div>
I can clear SVG using:
$('svg#thesvg').empty();
I can see the contents of SVG using:
var svgwrapper = $('#svgwrapper'); var svgcontents = $(svgwrapper).html(); alert(svgcontents);
However, I CANNOT WATCH to select SVG and see its path contents ...
my goal is something like
$('#thesvg path:last').remove();
thanks a million for any help
tuddy source share