Getting Started
First and foremost, simpleTree requires jQuery. It also works on dynamically added lists (thanks to a pull request from sydcanem)
Refer to the "Usage" part above for the tree structure:
- The top-most list (
ul element) has the parent class
- Make sure that
child lists are inside the li elements.
- If a
li element has a child list in it that you wish to toggle - create an element inside that li element and assign a toggle class in that element. This makes it the open/close toggle for that child list.
- Whenever a
toggle element is clicked, it is assigned a css class called closed. Go crazy on the styles of your toggle.
After constructing the nested lists, place them in a container. Call simpletree on that container in javascript.