Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/suryasankar/listree

A vanilla js package to convert a nested list into a tree menu
https://github.com/suryasankar/listree

Last synced: 2 months ago
JSON representation

A vanilla js package to convert a nested list into a tree menu

Awesome Lists containing this project

README

        

A tiny package to easily create a tree menu.

### Example Usage

Include listree.min.css and listree.min.umd.js in the header and footer respectively. Make sure that the unordered list in the html has class-markers like below (Should be easy to generate via any server side templating language. ). Then just invoke `listree()`. It will scan the document for the class markers and convert the ul list into a tree

```html



LisTree





listree();