Delete Node

133 views
Skip to first unread message

argam...@gmail.com

unread,
Aug 30, 2020, 3:52:12 AM8/30/20
to jsTree
Hi all,

I am trying to delete a node. I have add check_callback: true to the core and I am using

       var selectedNode = $("#jsTree").jstree("get_selected", true)[0];
     $('#jsTree').jstree().delete_node([selectedNode.id]);

But nothing happens....


Please, can anyoine guide mit to  the solution for deleting a node

Thanks a lot for you assistance :)

Arga

landinia...@gmail.com

unread,
Aug 30, 2020, 8:45:24 AM8/30/20
to jsTree
Hi this works for me.
var ref = $('#jsTree').jstree(true),
var sel = ref.get_selected();
ref.delete_node(sel);

Reply all
Reply to author
Forward
0 new messages