Treemenu.js is a simple jQuery plugin that recursively adds togglers to ul>li elements
npm install jquery.treemenu.jshttps://xevin.ru/treemenu-js-examples/
Download jquery.treemenu.js and jquery.treemenu.css files
or
install via yarn
`````
yarn add jquery.treemenu.js
install via npm
````
npm install jquery.treemenu.js
install via bower
````
bower install treemenu.js
1. include jQuery
``html``
2. include treeMenu script and styles in your document
``html``
3. Create tree
``html``
3. Attach treeMenu when the document is loaded
``javascript``
$(document).ready(function(){
$("ul.mytree").treemenu();
});
Use options:
``javascript```
$("ul.mytree").treemenu({
'delay': 300,
'closeOther': true,
'activeSelector': '.active',
'openActive': true
});