I'm trying to generate an svg using javascript. Here's my html SVG:
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 50 50" style="width: 50px;">
<ellipse cx="26" cy="26" rx="12" ry="16" fill="#ED1F24"/>
</svg>
Now here's the same SVG recreated with jquery:
var svgContainer = $('<SVG/>',{
"version":"1.1",
"xmlns":"http://www.w3.org/2000/svg",
"xmlns:xlink":"http://www.w3.org/1999/xlink",
"viewBox":"0 0 50 50",
"width":"50px"
});
var ellipse = $('<ELLIPSE/>',{
"cx":"26",
"cy":"26",
"rx":"12",
"ry":"16",
"fill":"#ED1F24"
}).appendTo(svgContainer);
svgContainer.appendTo($('body'))
The html output is identical but the generated svg doesn't appear. Here's an example:
Why doesn't it work?