diff --git a/README.md b/README.md index acd9b09..e9aeab1 100644 --- a/README.md +++ b/README.md @@ -4,11 +4,11 @@ A lightweight vanilla Javascript micro-library for making collapsible trees with ## usage ``` - jsonTree.init(object, selector, depth); + new jsonTree(object, selector, depth); ``` Because jsonTree uses document.querySelector(selector), selector can either be an ID or class, just be sure to specify with the proper identifier (. for class and # for ID). "depth" is a boolean which decides if jsonTree should apply a class to all children elements ("depth-#"). This can be used for custom styling but may increase loading times. -The JSON object must be a valid JavaScript object or a properly formatted URL(http://, etc), as XMLHttpRequests are annoying that way. +The JSON object must be a valid JavaScript object or a properly formatted URL (http://, etc), as XMLHttpRequests are annoying that way.