Questions tagged [jstree]
jsTree is a JavaScript-based, cross-browser tree component packaged as a jQuery plugin.
2,036
questions
0
votes
0
answers
37
views
How to split parent nodes in jstree?
The below reproducible code works fine for creating a vertical hierarchy tree, like the trunk of a tree. However I'd like to be able to horizontally split the hierarchy, essentially creating "...
0
votes
0
answers
13
views
jsTree plugin - Pages on the website are stuck in a constant reload loop
Guys i have problem with jsTree jQuery plugin. In my app am listing product categories.
I load categories from ajax and push in <div id="jstree_demo_div"> as writteb in the official ...
1
vote
0
answers
13
views
get array of all selected values in jstree
Good afternoon dear colleagues!
I have a program that works with a plugin using the jstree plugin. A json file with hierarchical data is used as input. You can see an example of the code for this ...
0
votes
0
answers
18
views
jsTree render multiple trees on same razor view
Im' using jsTree library to render a tree which display a hierarchical relationship of db data calling a controller function via ajax. The problem is that I need two trees on the same view and while ...
0
votes
1
answer
22
views
How to add secondary sequential numbering to elements dragged in to a hierarchy tree node using jstree?
I am trying to add secondary sequential numbering to elements dragged in to a hierarchy tree node, using the package jsTreeR, as shown in the illustration at the bottom. Below is the reproducible code ...
0
votes
1
answer
24
views
How to reorder sequential numbering when using drag and drop with a jsTree for a hierarchy tree?
I am trying to generate sequential numbering for elements dragged-in (copied-over) from one hierarchy tree node to another node, while giving the user the option of where to drop the element in the ...
2
votes
1
answer
31
views
How to add sequential numbering to elements dragged into a hierarchy node using jsTreeR?
I am evaluating different options for allowing users to build a hierarchy of a series of mathematical operations, and am trying out different packages such as jsTreeR, shinyTree, shinyDND, sortable, ...
1
vote
1
answer
31
views
How to delete hierarchical tree elements rendered using the jsTreeR package?
In running the reproducible code below, the user drags elements from the fixed options listed in the "Menu" node at the top of the hierarchy tree to the "Drag here" node underneath....
0
votes
0
answers
21
views
Fix the problem with set_id function in jsTree
So i'm trying to make jsTree from sql database via php. I have seen a lot of examples, and what i have got at this moment.
This is my php code:
case 'create_node':
$node = isset($_GET['id']) &&...
0
votes
0
answers
31
views
jsTree: Uncaught TypeError: $(...).jstree is not a function when .jstree functions are called
Good day, I know this question has been asked multiple times before, and I have tried all the suggestions on those posts (this includes the ones in jsTree Github Discussions as well as the jsTree ...
0
votes
0
answers
24
views
HTMX integration with jsTree
I have integrated jsTree Library to load a tree structure menu. On click am using HTMX library to dynamically load content without page refresh. tree node click triggers well, but the htmx get request ...
0
votes
0
answers
30
views
Use C# string as parameter in JQuery tree
Good day. I have a tree in my MVC view, where I can add in nodes like so:
<script type="text/javascript">
$('#jstree_demo').jstree({
'core': {
'data': [
...
0
votes
0
answers
9
views
I want to add a button outside the node in jstree
I'm a user who just used jstree.
As shown in the code below, I implemented a code that creates the rename/Delete Node button inside the node when the mouse is placed on the node, and it is currently ...
0
votes
0
answers
23
views
Need to merge jsons representing parent child relationship
I have json values to be depicted in jstree format
I want a union of json1 and json2 like the following merged json
The data for this jstree is in the following format
json1:
[
{ "id"...
0
votes
1
answer
28
views
how to uncheck all other nodes after check one node which are all on same top level?
I did once successfully but somehow lost original code, since I'm not expert in jstree so your help is very much appreciated, below is my attempt:
.on("select_node.jstree", (e, data) =&...
0
votes
0
answers
23
views
Save changes jsTree
The situation is as follows. It is necessary to save the changes after editing using the jsTree plugin (created, moved to another folder).
But I can't find an example code that says about this ...
0
votes
1
answer
33
views
JsTree 3.3.12 disable nodes by node type
I have many types for my tree, and i want to disable all nodes with common type ('disabled'). Is this possible in jsTree 3.3.12? Older version of jsTree has options for that but they don't seem to ...
0
votes
0
answers
72
views
Get All Selected Node values in JS Tree
I'm currently using js tree. I want to get the all selected node object.
Following is how I populate my jstree.
My JS Code
$(function () {
$('#data').jstree({
'core': {
...
0
votes
0
answers
15
views
How do I hide the checkbox on top-level nodes in JSTree using Jquery?
I need to hide checkboxes for only the top-level nodes in JSTree programmatically ?
Tree Structure:
A
1
2
3
B
4
5
C
6
How do I hide checkboxes for Nodes A, B and C while keeping checkboxes ...
0
votes
0
answers
28
views
Passing data between two JsTree, data is missing
I'm trying to transfer data from jsTree1 (source: from API Ajax) to jsTree2, using ContextContex Plug-in menu Copy/Cut > Paste, so User can re-leveling their data in jsTree2.
So, This is the first ...
0
votes
0
answers
19
views
How do I change my jsTree to only select children when clicked and toggle nodes when clicking on an anchor?
I need a jsTree, which reacts differently to clicks depending on if it is an anchor or a child that is clicked.
If an anchor is clicked, I need the node to open (if closed, and vise verca) and NOT ...
0
votes
0
answers
13
views
Jstree to open for a child node
I am trying to have jstree open from root parent to selected child node.
i am using jstree with mptt.
the template :
<div id="jstree" class="jstree">
<ul>
...
0
votes
1
answer
58
views
How to prevent checkbox from being checked when a node is clicked on JSTree?
I don't want the checkbox to be checked when the node is clicked, only when the checkbox itself is clicked.
The code below was copied from the JSTree website I think, and I copied a few lines from a ...
0
votes
0
answers
35
views
Using mptt with Jstree in Django
Only the first element is retrieved in the Jstree without it's children and the other root parent are out of the Jstree
The template:
{% load mptt_tags %}
<div class='component'>
{...
0
votes
0
answers
28
views
jstree rename node block alert tag HTML
I have a code used to edit the name in jstree, but when I change the name with an html code, it shows a message, how to block the html code?
'Rename': {
"separator_before": false,
...
1
vote
0
answers
20
views
jstree get checked node without expanding
I am using jstree. I want to get all checked node lists without expanding jstree. Can I use the data parameter? But I am unable to use this parameter.
$("#jstree").jstree("get_selected&...
0
votes
0
answers
44
views
jstree check_callback CheckOperation sending many ajax requests on mone_node
im sending ajax request on move_node to change the parent in db, and when doing this the request is being send many times starting from moving the node,
function CheckOperation(operation, node, parent,...
0
votes
1
answer
324
views
TreeView in ASP.NET Core MVC (data from SQL)
I am trying to create a list using a TreeView of several levels, the list consists of courses and modules, each course contains several modules, each module contains child levels and so on, the data ...
2
votes
1
answer
54
views
Parse a json generated by jstree in C#
I'm currently receiving the following string of an array that was generated from JsTree:
"[
{
"id":"j1_1",
"text":"Root node 1",
"...
0
votes
0
answers
34
views
how to export jstree desired json formatted from controller laravel
I am using jstree jQuery plugin to display Categories as tree view.
the data array from controller :
array:10 [
0 => array:13 [
"id" => 1
"name" => "Request 1"
&...
0
votes
1
answer
57
views
Display Jstree Attributes on the Right Side
I'm working on Jstree And I want to display a Node attribute on full right side of the screen. Css
Currently Showing Like this
I want to show the attribute like that
0
votes
0
answers
23
views
HTML select element on a jstree node closes immediately
select element on a jstree node closes immediately upon click. input loses focus similarly, but can be solved with JavaScript. However, it does not fix the problem with select. Below is a minimum ...
0
votes
0
answers
40
views
jstree .on loaded & .on changed issues
Working with jstree and I'm baffled. Keep in mind I'm a total js noob but pretty decent with php. So here's the issue. I display a jstree. The user selects a node and it submits a form and posts the ...
0
votes
1
answer
88
views
shinyTree - run function once tree is expanded
Let's assume I have a minimum working example like
library(shiny)
library(shinyTree)
ui <- fluidPage(
shinyTree("tree", contextmenu = TRUE, search = TRUE, unique = TRUE, sort = TRUE)
)
...
2
votes
2
answers
72
views
I can't read data from ajax with jstree
I am sending data from database to the page with Ajax. I want to show this data with jsTree. There are as many folders as the number of data I send. but it doesn't show their names. How can I properly ...
1
vote
0
answers
94
views
jquery JsTree: copy text with mouse
By default, the user can only click and open the tree to see the content. Is there even a way to allow users to select and copy the text content with mouse? maybe with CSS? (in this example, the texts ...
0
votes
0
answers
63
views
jstree confirm before delete
I would like to ask user, delete or not delete then call ajax.
But but where should the $.confirm method be?
Above code delete first for user screen then delete at backend.
How to call before $....
0
votes
0
answers
18
views
How to change just one node of jstree
I am using Jstree 3.2.1. I want to add a child node to one node in the tree without having to redraw the entire tree - just this node should be redrawn to reflect the new child. Everything I have ...
0
votes
1
answer
47
views
drag and drop is not working properly(dnd_stop)
I am trying to drag and drop functionality by using jstree.This function is working fine but mouse pointer not dropping text. It's show pointer with selected text.
my question is, How to remove text ...
0
votes
0
answers
30
views
I want disabled a context menu of jstree. My tree is created dynamically
i want disabled the contextmenu in some cases and some nodes specifyc.
but i have not to much experience in javascript.
I will make my tree with an array that i call to throught of my controller.
i ...
0
votes
0
answers
31
views
Toggling between tree view and flat view
I'm trying to display a xml data in tree view and flat view on click of an anchor tag. I have used jstree library for rendering tree view. Initially when the data is loaded and tree view is clicked, I'...
0
votes
0
answers
14
views
Building a jstree from a parametrized query
The code below works just fine, it retrieves the correct data from the DB and the tree gets populated. Elsewhere in the code I add/delete/edit the DB table and call the get_departments_as_tree() ...
0
votes
0
answers
84
views
How to change theme of jsTree using only mobile theme?
I'm using the jQuery plugin jsTree now.
I want to change its theme only shown mobile (or smaller website) theme, but now the only way I can do is add this config:responsive": true, which only ...
0
votes
0
answers
56
views
How to call refresh function in jsTree after call ajax?
When I call refresh() function in jstree after ajax , I can not understand why it run refresh function continuously while I just call it one time, here is my code:
$("#jstree_panel").on(&...
0
votes
1
answer
93
views
jstree disable_node not working when id is string
I want to disable some nodes in jstree plugin. I used the following code for this purpose and everything was fine.
var tidlist = ['17f6171a-4da6-4904-ae75-c290eb101717', '3fbb9e60-13f2-48e9-9323-...
0
votes
1
answer
36
views
How can I convert/populate a List<JsTreeModel> with a select statement from my database?
I'm following along with this tutorial (http://dotnetqueries.com/Article/62/implementing-jstree-in-asp-net-mvc-with-json-data), and I have everything up and working correctly. The only change I am ...
0
votes
0
answers
102
views
is it possible to have radio button for parent and checkbox button for children in jstree?
I want the parent nodes to act like radio buttons but all its child nodes to be checkbox buttons, using "multiple: true" alone is not enough, what i want is by clicking/checking one of ...
0
votes
0
answers
174
views
How to edit Jstree input text?
i can use Metronic Theme and i have a class like this
<div class="pb-5" data-wizard-type="step-content">
<div id="...
0
votes
0
answers
57
views
jsTree - Rename update DOM with JSON from AJAX
I have the following code that calls AJAX on a rename from the context menu of the jsTree. The AJAX call updates the database with the text user entered, BUT only if it is a value in a table. SO if ...
1
vote
1
answer
129
views
How to open all jstree nodes (parents and children)
There is a webpage that has 129 parent node.
And each parent node has multiple children to the fourth level (order>family>genus>specie).
I want to Open-all nodes.
I saw some posts here with a ...