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

Commit

Permalink
Fix usage
Browse files Browse the repository at this point in the history
  • Loading branch information
Max Leiter committed Nov 25, 2017
1 parent 6b1fc2d commit cdf663c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

0 comments on commit cdf663c

Please sign in to comment.