jQuery namespace bug with SVG elements

When inserting SVG element, jQuery is not able to deal with the SVG namespace. As a consequence, the SVG element is not render

by JeremiePat

HTML

<svg width="100px" height="100px">
    <circle cx="50" cy="50" r="39" fill="red" />
</svg>
<p>You should see 2 green circle.</p>

JavaScript

$(function () {
    $('body').prepend('<svg width="100px" height="100px"><circle cx="50" cy="50" r="40" fill="green" /></svg>');
    $('svg').append('<circle xmlns="http://www.w3.org/2000/svg" cx="50" cy="50" r="40" fill="green" />');
});