diff options
author | dotnetCarpenter <jon.ronnenberg@gmail.com> | 2016-11-04 18:15:03 +0100 |
---|---|---|
committer | dotnetCarpenter <jon.ronnenberg@gmail.com> | 2016-11-04 18:15:09 +0100 |
commit | 8b24eb02ded49b77f04cb7b5214c224569fc841b (patch) | |
tree | fefc3ac86e1e27490aebeb7baef3c0b04de2620b /README.md | |
parent | 80e478c1d128b6eeb9db829e06fddcf1f9d14390 (diff) | |
download | svg.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.md | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -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 |