summaryrefslogtreecommitdiffstats
path: root/README.md
diff options
context:
space:
mode:
authordotnetCarpenter <jon.ronnenberg@gmail.com>2016-11-04 18:15:03 +0100
committerdotnetCarpenter <jon.ronnenberg@gmail.com>2016-11-04 18:15:09 +0100
commit8b24eb02ded49b77f04cb7b5214c224569fc841b (patch)
treefefc3ac86e1e27490aebeb7baef3c0b04de2620b /README.md
parent80e478c1d128b6eeb9db829e06fddcf1f9d14390 (diff)
downloadsvg.js-8b24eb02ded49b77f04cb7b5214c224569fc841b.tar.gz
svg.js-8b24eb02ded49b77f04cb7b5214c224569fc841b.zip
update doc for SVG() in alignment with comment: https://github.com/svgdotjs/svg.js/issues/139#issuecomment-256987267
Diffstat (limited to 'README.md')
-rw-r--r--README.md8
1 files changed, 8 insertions, 0 deletions
diff --git a/README.md b/README.md
index 7ccd628..6d39156 100644
--- a/README.md
+++ b/README.md
@@ -23,6 +23,14 @@ var draw = SVG('drawing').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.
+Be aware that the HTML element must exist before running the svg.js code.
+
+Given this HTML:
+
+```html
+<div id="drawing"></div>
+```
+
This will generate the following output:
```html