Skip to content
This repository was archived by the owner on Apr 25, 2023. It is now read-only.

Commit cdf663c

Browse files
author
Max Leiter
committed
Fix usage
1 parent 6b1fc2d commit cdf663c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@ A lightweight vanilla Javascript micro-library for making collapsible trees with
44
## usage
55

66
```
7-
jsonTree.init(object, selector, depth);
7+
new jsonTree(object, selector, depth);
88
```
99

1010
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).
1111

1212
"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.
1313

14-
The JSON object must be a valid JavaScript object or a properly formatted URL(http://, etc), as XMLHttpRequests are annoying that way.
14+
The JSON object must be a valid JavaScript object or a properly formatted URL (http://, etc), as XMLHttpRequests are annoying that way.

0 commit comments

Comments
 (0)