I find it difficult to remove the child nodes of the selected node.
$(function () {
$("#tree").jstree({
"json_data" : {
"data" : [
{
data : "/",
attr : { "id" : "root"},
state : "closed",
"children" : [ { "data" : "child1",
"attr" : { "id" : "child1.id" },
"children" : [ ] }
]
},
]
},
"plugins" : [ "themes", "json_data", "crrm", "ui" ]
})
I am using $ ("# tree"). jstree ("remove", data.rslt.obj); to remove the child nodes below the node itself, but also removes the selected node. How to remove only the child nodes of the selected node, and not the selected node?
RAhul source
share