Questions tagged [jstree]

jsTree is a JavaScript-based, cross-browser tree component packaged as a jQuery plugin.

jsTree is jquery plugin written by Ivan Bozhanov, that provides interactive trees. It is absolutely free, open source and distributed under the MIT License. jsTree is easily extendable, themable and configurable, it supports HTML & JSON data sources and 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.

Just a few of the features worth noting:

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

It supports multiple browsers including Internet Explorer 8+, Mozilla Firefox, Safari, Opera and Google Chrome, as well as most mobile browsers.

See also:

2044 questions
16
votes
2 answers

Lazy-loading TreeView with JsTree in Asp.Net MVC

I am using JsTree on my project. I want to do like that: I want to show just root nodes when tree loaded first time after I want to show sub-nodes when I clicked root node (+) or of sub-node. I mean, I want to get from database and add to the…
mstfcck
  • 721
  • 3
  • 11
  • 28
16
votes
5 answers

Lazy loading with jsTree

I am trying to dynamically load the nodes of a jtree when they are expanded. The little documentation I found is at the end of this page. I found some solutions that create the nodes one by one with a loop like this one. I have not tried it, but…
stenci
  • 8,290
  • 14
  • 64
  • 104
15
votes
4 answers

jstree checkbox manipulation

I have a jstree with checkbox for every nodes. I want to achieve the following. Let me know which method or part of api helps us to do that. I do not want to check any child nodes when parent node is selected. Currently all the children gets…
Ashwin
  • 12,081
  • 22
  • 83
  • 117
15
votes
2 answers

JsTree: Show more options

Is there any way to have a show more option/link in jsTree? I want to show only part of the children and have a link to expand to show all elements. I tried a few google searches but could not find a solution. Any help/hint would be useful. Let's…
Jeya Suriya Muthumari
  • 1,947
  • 3
  • 25
  • 47
15
votes
2 answers

Geting all the selected nodes in jstree on check event?

I'm using get_bottom_selected to get all the checked/selected nodes in JSTree. When I setup a button in my form that calls the following method it works. When I try to call the same function from check box click event it does not find any selected…
user1904898
  • 59
  • 4
  • 18
15
votes
2 answers

jstree showing all nodes if search string didn't match any node

I'm rendering jstree with following config $('#deliverables').jstree({ 'core': { 'data': data }, 'search': { 'case_insensitive': true, 'show_only_matches' : true }, 'plugins':…
Murali Mopuru
  • 6,086
  • 5
  • 33
  • 51
15
votes
3 answers

how to get click event of row element of jstree?

Can you please tell me how how to get click event of row element of jstree ? I make a demo of jstree in my fiddle .it is made in panel .you have to press "open panel " button to check panel I want to click event of jstree element to get it id on…
user3530755
14
votes
2 answers

How can I suppress cascade on the initial load of jsTree?

I'm using jsTree with the checkbox plugin. I have the cascade set to "down". This works great, except that when I want to load data with a mixture of checked and unchecked nodes, the cascade overrides the "state" setting for nodes. E.g. var data =…
David Hammond
  • 3,286
  • 1
  • 24
  • 18
14
votes
3 answers

JSTree - disable selection on a parent node, but allow expansion on click

I'm trying out the excellent JSTree 3.0.2. I have a tree with one level of child nodes. When a parent node is clicked I want it to expand, but I don't want the parent node to be selectable - only the child nodes should be selectable. I can get…
JohnOT
  • 166
  • 1
  • 1
  • 9
14
votes
3 answers

Expand jsTree node when parent is clicked

I am trying to implement a very simple tree using jsTree. I have found the documentation dense and overwhelming. Right now, I expand / collapse a node by clicking the arrow shown here: I want to be able to expand / collapse by clicking the node…
John 'Mark' Smith
  • 2,564
  • 9
  • 43
  • 69
14
votes
1 answer

jstree get_json returns false

I'm using jsTree plugin to display tree. The tree is loaded using ajax to a div with ul-li structure. And here is how I initialize it. $("#jseq_tree").jstree({ "core" : { "check_callback" : true}, "plugins" :…
realplay
  • 2,078
  • 20
  • 32
13
votes
8 answers

JS Tree links not active

I am new to Jquery and JS Tree but learning to love it. I have set up a tree menu using php generated xml (see code below). It works as expected with one exception - The links are not active. I know there is something basic I don't understand. Short…
Andy B
  • 180
  • 1
  • 1
  • 12
13
votes
8 answers

jstree checkbox checked on load

I'm fighting with jQuery jsTree plugin checkbox. Ok, I have find out how to handle events on checking or unchecking checkbox. If its useful I can paste a code: .bind("check_node.jstree", function(e, data) { if(data.rslt.obj !==…
ignas
  • 371
  • 1
  • 6
  • 13
13
votes
2 answers

Programmatically adding child nodes to a jstree

I'm trying to write some code that adds nodes to a jstree dynamically. I've followed the doc at http://www.jstree.com/documentation/crrm but can't get a simple example to work -- the node child2 is being added, but it is being added to the node…
user419766
  • 191
  • 1
  • 2
  • 4
13
votes
4 answers

Disable Multiple Selection in JSTree is not working

I am using JSTree in my application with following code. this.CreateTreeView = function () { $('#jstree_demo_div').jstree({ 'core': { 'multiple': false, 'data': [ { "id": "ajson1", "parent": "#",…
Nirav Kamani
  • 3,192
  • 7
  • 39
  • 68