diff --git a/src/svg.js b/src/svg.js
index <HASH>..<HASH> 100644
--- a/src/svg.js
+++ b/src/svg.js
@@ -1,9 +1,14 @@
 module.exports = {
 	draw: function(parent, svgString, config) {
 		if (!parent) return;
-		var el = root.getElement(svgString, config);
+		var el = module.exports.getElement(svgString, config);
 		if (el) {
-			$(parent).append(el);
+			if (parent.append) {
+				parent.append(el);
+			} else {
+				//regular dom doc
+				parent.appendChild(el);
+			}
 		}
 	},
 	getElement: function(svgString, config) {
fixed issue with reference to missing jquery