Skip to content

A lightweight vanilla Javascript micro-library for making collapsible trees with JSON

License

Notifications You must be signed in to change notification settings

ashr4f1arr2ad/jsonTree

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

71 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

jsonTree

A lightweight vanilla Javascript micro-library for making collapsible trees with JSON

usage

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.

About

A lightweight vanilla Javascript micro-library for making collapsible trees with JSON

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 74.0%
  • HTML 24.1%
  • CSS 1.9%