summaryrefslogtreecommitdiffstats
path: root/src/selector.js
diff options
context:
space:
mode:
authorwout <wout@impinc.co.uk>2014-06-17 20:17:01 +0200
committerwout <wout@impinc.co.uk>2014-06-17 20:17:01 +0200
commit1c50b34aba8fe613f4002cc84b41411c0f546308 (patch)
treec4ea746d29e650605eec74c17abca0127f37876f /src/selector.js
parentadad1d062678522e684bfe5216f63a3f400bd3c9 (diff)
downloadsvg.js-1c50b34aba8fe613f4002cc84b41411c0f546308.tar.gz
svg.js-1c50b34aba8fe613f4002cc84b41411c0f546308.zip
Added marker, symbol and dynamic referencing
Diffstat (limited to 'src/selector.js')
-rw-r--r--src/selector.js5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/selector.js b/src/selector.js
new file mode 100644
index 0000000..905e9f9
--- /dev/null
+++ b/src/selector.js
@@ -0,0 +1,5 @@
+// Method for getting an element by id
+SVG.get = function(id) {
+ var node = document.getElementById(idFromReference(id) || id)
+ if (node) return node.instance
+} \ No newline at end of file