I have the following code snippet:
draw: function drawFn ($dial) { var width = $dial.width(), height = $dial.height(), $svg = $('<svg />').attr({ "width": width, "height": height }), circle = $('<circle />').attr({ "cx": 0, "cy": 0, "r": width / 2, "fill": "red" }); $svg.append(circle); $dial.append($svg); }
$dial is a jQuery wrapped <div> element with width and height.
The <svg> and <circle> elements are added to the <div> , but they do not have a visible size. What am I missing?
Spell here: http://jsfiddle.net/alexcoady/pLvAw/2/
source share