I'm trying to put circles in svg dynamically. In index.html
file I created this svg
section.
<svg id="svgArea" width="500" height="500"></svg>
In js file i tried this
$('#svgArea').append('<circle cx="50" cy="50" r="40" stroke="green" stroke-width="4" fill="yellow" />');
This seems not working.
Tried the below code, but couldn't find how to apply cx, cy, r ...
var crcl= document.createElement("CIRCLE");
$('#svgArea').append(crcl);
What I am trying to achieve is dynamically create n circles on a button click. And on another button click delete buttons one by one.