diff --git a/Create-document.md b/Create-document.md new file mode 100644 index 0000000..2978f64 --- /dev/null +++ b/Create-document.md @@ -0,0 +1,35 @@ +Use the `SVG()` function to create a SVG document within a given html element: + +```javascript +var draw = SVG('canvas').size(300, 300) +var rect = draw.rect(100, 100).attr({ fill: '#f06' }) +``` +The first argument can either be an id of the element or the selected element itself. +This will generate the following output: + +```html +