Tree Plugin

The tree plugin converts a nested list into a tree view where sub menus can be expanded.


This plugin can be activated using the data-api or jQuery.

Data Api

Add data-widget="tree" to any ul or ol element to activate the plugin. All options can be passed using the data api. Example: data-animation-speed="1000".



Name Type Default Description
animationSpeed Number 500 Speed of slide down/up animation in milliseconds.
accordion Boolean TRUE Whether to collapse the open menu when expanding another.
followLink Boolean FALSE Whether to follow the link in the a element instead of expanding the sub menu.
trigger String .treeview a Selector of the element that should respond to the click and result in expanding or collapsing it sibling sub menu.


Name Description
expanded.tree Triggered after a sub menu expands.
collapsed.tree Triggered after a sub menu collapses.

Example: $('ul').on('expanded.tree', handleExpandedEvent)


Kero ─ $49

Bootstrap 4 Admin Dashboard Template

Preview Buy Now

500+ purchases