Create Nice Responsive Tree View Menu Using Jquery jsTree Plugin

In this post I am going to introduce one more awesome jquery plugin to create nice responsive tree view with inline add edit and delete feature. jsTree is jquery plugin, that provides interactive trees. jsTree is easily extendable, themable and configurable, it supports HTML & JSON data sources and also support AJAX loading. jsTree functions properly in either box-model (content-box or border-box), can be loaded as an AMD module, and has a built in mobile theme for responsive design, that can easily be customized. It uses jQuery’s event system, so binding callbacks on various events in the tree is familiar and easy.

jsTree Features:

* drag & drop support
* keyboard navigation
* inline edit, create and delete
* tri-state checkboxes
* fuzzy searching
* customizable node types

Integrate jsTree Plugin In your website to create Tree View menu

Follow below steps to configure jsTree Plugin In your website.


First Include jsTree CSS + JS library on page, Default theme can be auto-loaded, but it is best to include the CSS file. jsTree dependent on jquery library, Include jquery 1.9+ before jstree js library.

<link rel="stylesheet" href="" />
<script src="" integrity="sha256-hwg4gsxgFZhOsEEamdOYGBf13FyQuiTwlAQgxVSNgt4=" crossorigin="anonymous"></script>
<script src=""></script>


Setup a container element for your Tree view menu. In below example choose div as container where created tree view using ul li tag.

<div id="jstree">
    <!-- in this example the tree is populated from inline HTML -->
      <li>Root node 1
          <li id="child_node_1">Child node 1</li>
          <li>Child node 2</li>
      <li>Root node 2</li>


Create an instance when the DOM is ready

$(function() {  

Bind to events triggered on the tree

$(function() {  
 $('#jstree').on("changed.jstree", function (e, data) {

You can change the defaults for all future instances:

$(function() {  
 $.jstree.defaults.core.themes.variant = "large";

But most of the time you will want to change the defaults only for the instance that is being created. This is achieved by passing in a config object when creating the instance:

$(function() {  
  "plugins" : [ "wholerow", "checkbox" ]

See live demo and download source code.


See official github repository for more information and follow for future updates.Don’t forget to read license for using above plugin in your commercial project.