How to get IDs of selected nodes to root node in jsTree?
Assume F and D are selected nodes , I want to get all the ids include A B C D F
- A
- B
- C
- D
- E
- F
Following code will return only immediate selected ids D and F
var getMenuIds = function(){
var menuIds = $("#menu-tree").jstree("get_checked");
window.alert(menuIds.join(","));
$('#menuIds').val(menuIds.join(","));
}
Is there any way to get all parent nodes ID i.e. Selected node to root node ?
Call get_path to get the path to each selected node.
Something like: