Reputation: 191
I am trying to find a way to create a child node (with .jstree("create", null, "inside", ....
).
But this will create a new node as the last of all existing children.
Is it possible to force to add the new node as the (new) first child?
Upvotes: 1
Views: 988
Reputation: 1224
I used this code:
$('#jstree').jstree(true).create_node('#', //parent node, '#' for root
"new first node", //data of the node
"first" //position of the new node: first, last
);
Also please check out the jsTree API.
HTH
Upvotes: 2