I can remove the line linearGradient with jQuery in a SVG but I can't add it. Why?
HTML
<textarea>
<linearGradient y2="1" x2="1" id="g" spreadMethod="reflect">
<stop stop-color="#F00" offset="0"/>
<stop stop-color="#F0F" offset="1"/>
</linearGradient>
<style type="text/css" >
<![CDATA[
path { stroke: #009900;
stroke-width: 0.1;
fill:url(#g);}
]]>
</style>
</textarea>
JS
$('#remove').click(function()
{
$('svg style, svg linearGradient').remove();
});
$('#set').click(function()
{
$('svg').prepend($('textarea').val());
});