Questions tagged [jstree]

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

jstree
Filter by
Sorted by
Tagged with
13 votes
4 answers
17k views

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 ...
Cedric Berlanger's user avatar
13 votes
2 answers
46k views

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....
Hunter Hodnett's user avatar
13 votes
3 answers
13k views

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 ...
Efrin's user avatar
  • 2,383
12 votes
3 answers
27k views

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 ...
Flexer's user avatar
  • 253
12 votes
3 answers
22k views

jstree types plugin does not display custom icons

I have a simple HTML layout that looks like this: <div id="foo"> <ul> <li id="id1"><a href="#">some category 1</a> <ul><li><a href="#">some ...
gdanko's user avatar
  • 1,962
12 votes
1 answer
28k views

Create custom item in jsTree Context menu

I create a treeview using jsTree with contextmenu in asp.net mvc3. <div id="divtree"> <ul id="tree"> <li><a href="#" class="usr">@...
Ragesh Puthiyedath Raju's user avatar
12 votes
2 answers
17k views

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 ...
user529011's user avatar
12 votes
1 answer
18k views

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. <div id="jstree"> </...
Sunil Madan's user avatar
11 votes
5 answers
22k views

How do I get leaf nodes in jstree to open their hyperlink when clicked when using jstree ui?

I display a hierachial structure using jtree, the data is as follows <div id="songchanges"><ul> <li id="phtml_1"> <a href="#">C:</a> <ul> <li id="phtml_2"> &...
Paul Taylor's user avatar
  • 13.6k
11 votes
7 answers
20k views

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 ...
Haphazard's user avatar
  • 10.9k
11 votes
6 answers
16k views

jsTree Hide Checkbox

I am using the jsTree jQuery plugin to display a 5 level deep tree. I would like to not show checkboxes on the last level. Is there any way to do that in the setting or some jquery processing I can ...
jrock10's user avatar
  • 388
11 votes
1 answer
26k views

JsTree checkbox - check event

I have this JsTree with this code: var Tree = $("#MyTree"); Tree.jstree({ "core": { "themes": { "responsive": false, "...
Lorenzo Grossi's user avatar
11 votes
3 answers
25k views

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 ...
Ashwin's user avatar
  • 12.3k
10 votes
5 answers
14k views

how to get the metadata of jsTree.

This is my code: $("#demo1").jstree({ "themes": { "theme": "default", "dots": true, "icons": true, "url": "static/themes/default/style.css" ...
zjm1126's user avatar
  • 35.2k
10 votes
2 answers
5k views

jQuery JsTree and JSON error handling

I am using MVC to pass JSON data to JsTree and show a hierarchical view of information. Everything is working just fine, however, there are times when the user does not have access the the data or for ...
sam360's user avatar
  • 1,121
9 votes
6 answers
16k views

jsTree "create_node" really not working

I am trying to dynamically add a new node in my jsTree container. It is not working at all. I don't know what i am missing. jsfiddle example $("#tree").jstree({ core: { "animation": 0 ...
Catalin's user avatar
  • 11.6k
9 votes
6 answers
62k views

Get the selected Node from a jstree

I am trying to get the selected Node from a jstree. This is the code in the View <div id="divtree" > <ul id="tree" > @foreach (var m in Model.presidentList) { ...
Cristian's user avatar
  • 187
9 votes
2 answers
19k views

jsTree dnd events not firing

I'm trying to capture dnd events in jsTree 3.0.0. I used the demo code to build event handlers. The tree builds fine, but the events never fire. What am I missing? This is the pertinent part. The ...
GeoJunkie's user avatar
  • 499
9 votes
3 answers
38k views

How to get node by ID in Jstree

I have created a jstree and i have a problem with getting node by id of jstree. when i use get_node, i get an error: TypeError: $(...).jstree.get_node is not a function this is html code: <...
ZSH's user avatar
  • 651
9 votes
3 answers
8k views

How do I make jstree to select node only on left click?

Currently both left and right click select the node which interferes contextmenu as I use left clicks to go to other pages. How do I make select_node.jstree event know which mouse button is being ...
Alexander Suraphel's user avatar
9 votes
3 answers
22k views

how to deselect all element in jquery?

I want to deselect (remove selected element ).I am using jstree in my demo .So I read the plugin api . http://www.jstree.com/api/#/?f=deselect_all([supress_event]). But it not deleselect the selected ...
user avatar
9 votes
4 answers
15k views

Disable the whole jsTree

I'm using jsTree and have a form on the right of it based on the selected node that can be edited/saved. The goal is to prevent the user from clicking anywhere else on the tree while they are editing ...
Narine Cholakian's user avatar
9 votes
2 answers
12k views

JsTree: How to sort jstree nodes with folders at the top

I use the plugin Jstree to draw a tree of folders ans files. I want to get the list of folders at the top then the list of files (the list of folders and files must be sorted in alphabetical order). ...
Aminesrine's user avatar
  • 2,092
9 votes
1 answer
6k views

JsTree with custom json data

I have this structure in json I can not be modified by request. { "Object": [ { "url": "http://www.google.com" } ], "id": 1,...
Crapo Wolf's user avatar
  • 2,301
9 votes
2 answers
14k views

JsTree how to create a root node

How to create a root node using 'create' method Root |___ Child1 |___ Child2 I am using JsTree, by using 'json_data' I can able to create nodes, but I want to create all nodes dynamically using '...
sokid's user avatar
  • 813
9 votes
4 answers
11k views

jstree performance issues

I am using a jsTree with around 1500 nodes, nested to a max of 4 levels (most are only 1 level deep), and I'm getting Internet Explorer's "this script is running slowly" error. I began with just a ...
mike's user avatar
  • 561
9 votes
2 answers
13k views

jstree disable checkbox

I am currently working on some POC using JS Tree plugin and related check box plugin. For certain nodes I need to check the check box by default and disable any further selection.I found the function ...
Pavan Josyula's user avatar
9 votes
2 answers
20k views

How to set custom icon for jstree with html source

I need to have a jstree that is configurable from the database and I'm having trouble with the icons (this is just another column in my query containing the name of the icon). The problem is that I ...
Roger's user avatar
  • 2,922
9 votes
2 answers
19k views

search jstree nodes using jquery javascript

I am using jstree plugin to build my tree. I have a search box in my web page where I need users to be able to search for the jstree nodes. <fieldset id="search"> <input type="text" ...
user1471980's user avatar
  • 10.4k
9 votes
2 answers
9k views

Jstree state plugin not saving tree state

Adding the state plugin in Jstree is still not saving the state of the tree between page refresh or after clicking link and going back to previous page $('#myGrid').jstree({ "types": { "...
Amda's user avatar
  • 91
8 votes
2 answers
4k views

jstree 3.0.0 contextmenu right click not working. Showing TypeError: vakata_context.element.html is not a function

My code is rendering tree, parent, child everything fine but right click contextmenu is not showing. Firebug shows error "TypeError: vakata_context.element.html is not a function". If I remove ...
Obaidul Hye's user avatar
8 votes
1 answer
15k views

Changing the theme with jstree 3.0.0

I'm trying to change the theme as follows: I copied the contents of the default folder and copied them into a folder called david I used replace all in style.css to change instances of .jstree-...
DavidHyogo's user avatar
  • 2,858
8 votes
2 answers
10k views

How to get full path of selected node in jstree?(root node to selected node)

I want to build a directory management system where user can create,rename,delete directories and save files in directories. for this i am using jquery jstree. my jsTree is like:- *A(root node) *...
R K Sharma's user avatar
8 votes
5 answers
13k views

JsTree: changing the "open" icon for folders using the "types" plugin

It's easy to specify what the icon should be for a closed folder using the "types" plugin. But can the types plugin also be used to specify what an open folder should look like, or can I only do this ...
Captain Sensible's user avatar
8 votes
2 answers
16k views

jsTree disable some of the checkboxes

Using jsTree (3.1.0+) with checkbox plugin is it possible to allow not all checkboxes to check - disable some of them? I found solution for old versions of jsTree here jstree disable checkbox but it ...
Orbitum's user avatar
  • 1,645
8 votes
2 answers
14k views

How to listen for double-click on jstree?

How would I write a listener for a double-click event on a jstree object? (For example, I'd like to double-click on a tree node and paste its anchor's href value into an input field in a form ...
Alex Reynolds's user avatar
8 votes
5 answers
10k views

JSTree: Make node expand when single clicked instead of double click?

I can't figure this out for the life of me but I am trying to configure my JSTree to override the double click event so it is just single click event. Is this something added to the callback ...
MetaGuru's user avatar
  • 43.3k
8 votes
3 answers
14k views

Node icon in a jsTree tree with font-awesome

I have a tree structure using jsTree, like this: <div id="jstree"> <ul> <li>Root 1 <li> Child 1</li> </li> &...
Colet's user avatar
  • 495
8 votes
1 answer
22k views

Jstree: Cannot read property children of undefined. Timing issue?

I have an array of objects where each of them look like this structure: var data = [{ "code" : "i1", "name" : "Industry 1", "parentCode" : "i0" }, { //and more items just like that one }]; so I am ...
telex-wap's user avatar
  • 852
8 votes
1 answer
4k views

jstree keyboard navigation after search with "show_only_matches" as true

I am trying to use jstree keyboard navigation with search plugin . Everything is ok but after I add show_only_matches as true the navigation didn't work as expected . Maybe because there are hidden ...
HADEV's user avatar
  • 437
8 votes
1 answer
3k views

JsTree conflicts with jquery.validate

I have a Jstree populating a list of items. When I click a node a partial is loaded with ajax. Everything works fine until I include the jquery.validate script to validate my forms. <script src="/...
madcapnmckay's user avatar
  • 15.9k
8 votes
2 answers
5k views

jstree select_limit not working. I want to set selection limit to select only 3 nodes

My jstree function is here. I have set 'select_limit' : 3, but is not working. when I run, I am able to select more than 3 nodes, but I need to select no more than 3 nodes. var j1 = jQuery....
RavatSinh Sisodiya's user avatar
8 votes
1 answer
13k views

jsTree: async loading

I am trying to use this jQuery plugin (jsTree) in one of my project. All the others I've found haven't been recently updated. Anyway, I am using this plugin to load a folder structure, but I would ...
LeftyX's user avatar
  • 35.5k
8 votes
1 answer
20k views

js Tree error for function .jstree() [closed]

I am implementing a jstree in mvc4, but when I run my application no tree view is displayed. I have tried to track the error with Firebug and found the following error: "TypeError: $(...).jstree is ...
Monika D's user avatar
  • 103
8 votes
2 answers
5k views

jsTree: progressive_render with ajax / render nodes from an array

This is regarding the jsTree jQuery plugin. I've been struggling with this for a while now only to realise it's not (natively) possible to do, so I thought about the following solution to my problem ...
Amir's user avatar
  • 1,882
8 votes
1 answer
21k views

An simple jstree example that can create/rename/delete node

New to jstree and jquery, was looking for a simple tutorial that can create, rename and delete nodes, but couldn't find it even though there are a few good tutorials (either not working in my ...
packetie's user avatar
  • 4,949
7 votes
4 answers
8k views

jstree drag and drop restrict node before and after root

In my jstree I have a Root node which is the parent node of all. I have used dnd plugin. I want to allow drag and drop anywhere in the tree but only inside the root i.e. not before or after the Root. ...
Ashwin's user avatar
  • 12.3k
7 votes
8 answers
12k views

JsTree v3.0 drag and drop plugin. Reference target node upon dropping

I use drag and drop plugin of jsTree library (ver. 3.0) With the following code I can bind to the end of drag'n'drop action, but I can not see a way to get the reference to the target node (the node I'...
eagor's user avatar
  • 9,510
7 votes
2 answers
5k views

Is there a way to add extra columns to a jstree?

I'm using jQuery and jstree. I would like to have extra columns appear to the right of the node labels so that I can put additional info in them such as dates, text, etc. How can I do this in jstree? ...
John Mills's user avatar
  • 10.1k
7 votes
1 answer
6k views

How to manage the contextmenu of jsTree as per the file and folder

I have stuck to manage the contextmenu after the right click . Actually I need to display some item of contextmenu for folder and some item of contextmenu for folder. On click of folder context menu ...
Vik's user avatar
  • 5,931

1
2
3 4 5
41