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
13
votes
8 answers

jstree select node

Greetings, I am using jsTree to generatate my hierarchical data. JsTree is generated as follows: $(function() { $("#industries").tree({ data: { type: "json", opts: { url: "/Admin/GetIndustries/" …
niao
  • 4,972
  • 19
  • 66
  • 114
13
votes
4 answers

Deselect selected treenode JStree - jQuery

Situation When my page is loaded and my treeview is visible, no treenode is selected. When I click on a node, it's selected, which is default behavior. Question How can I deselect the node while clicking on the same node? So I want to click on a…
Cedric Berlanger
  • 231
  • 1
  • 3
  • 10
13
votes
3 answers

jsTree load children by ajax

Code posted below loads root elements for my tree by ajax request. My tree is very large so I can't load all items at once so I need to load elements by requesting children for specific ID's. How do I load elements by ajax by clicking on node? …
Efrin
  • 2,323
  • 3
  • 25
  • 45
13
votes
2 answers

Populating a JSTree with JSON data obtained in AJAX

I'm trying to populate a JSTree with JSON data that I'm obtaining from a service (which is called using ajax). However, I am getting a "Neither data nor ajax settings supplied error" in the jquery.jstree.js file. Because of this the JSTree just…
Hunter Hodnett
  • 307
  • 2
  • 5
  • 16
13
votes
3 answers

jstree move, drag and drop

I want to implement the move functionality for a node in jstree. Is it the move that needs to be implemented or the drag and drop? Also, it would be nice to have working code for binding the container to event and the event code.
Len Smith
  • 187
  • 2
  • 2
  • 10
13
votes
1 answer

JsTree - Expand by clicking Parent Node

I'm using JsTree. Right now, the elements of the tree only expand when the icon NEXT to the parent node is clicked. How can I make it so the tree expands also when the parent node is clicked?
djt
  • 7,297
  • 11
  • 55
  • 102
13
votes
5 answers

jsTree : How to get all nodes from jstree?

How to get all nodes present in jsTree? I am building jsTree with xml Root -----A -----A1 -----A1.1 -----A1.2 -----A2 -----`A2.1` -----A2.2 -----B …
StackOverFlow
  • 4,486
  • 12
  • 52
  • 87
13
votes
2 answers

jsTree : How to get IDs of selected nodes to root node in jsTree?

How to get IDs of selected nodes to root node in jsTree? Assume C is selected node then How can I get All parent IDs of C. A B C +C1 +c2 Following code will return only immediate parent ID: If I selected C then I get only B …
StackOverFlow
  • 4,486
  • 12
  • 52
  • 87
12
votes
3 answers

jstree types plugin does not display custom icons

I have a simple HTML layout that looks like this:
12
votes
2 answers

Jquery Jstree checkbox events capture

I am totally new to jQuery and jstree. I am using jstree and populating the data using xml. But would like to capture event for each node whether checked or not along with their Ids. I tried using jstree's plugins API like…
user529011
  • 161
  • 2
  • 2
  • 7
12
votes
1 answer

programmatically add Node in jstree

I am trying to add a new node in jstree programmatically on button click, as well as on contextmenu create click, but there is some issue. Here is the link of fiddle.
Sunil Madan
  • 457
  • 1
  • 4
  • 17
12
votes
3 answers

jsTree: How to expand all nodes on first visualization and then save and restore state with 'cookies' plugin

I plan to use jsTree to visualize tree like structures and I would like to achieve the following behavior: on first time visualization I want to have all nodes expanded any consecutive visualizations will restore to the previous state of the tree…
Flexer
  • 253
  • 1
  • 2
  • 12
12
votes
1 answer

Create custom item in jsTree Context menu

I create a treeview using jsTree with contextmenu in asp.net mvc3.
Ragesh P Raju
  • 3,879
  • 14
  • 101
  • 136
11
votes
3 answers

creating a new node in jstree

I am creating a node by using crrm as below $("#TreeDiv").jstree("create", $("#somenode"), "inside", { "data":"new_node" }); This function is called through a wizard (i.e I am creating a node in place). So far I am successful to get a node under…
Ashwin
  • 12,081
  • 22
  • 83
  • 117
11
votes
7 answers

JQuery JSTree - add a ToolTip

Is there a way to add a Tooltip to a JSTree node? I would like to display extra information when the user hovers over an element. I'm pretty dense when it comes to JQuery so there may be an obvious answer to this. Edit: Thanks to zzzz below, I am…
Haphazard
  • 10,900
  • 6
  • 43
  • 55