Jstree: I can't reset all the checkboxes to uncheck by default when I reload my tree

6.2k views Asked by At

I tried to use this:

$("#jstree_demo_div").jstree("destroy").empty();  

It removes the checked nodes and reload the tree but does not apply the new changes. Any suggestion will be greatly appreciated.

Globally I need to reset my tree with unchecked checkBox

2

There are 2 answers

0
user3542482 On

this is working nice for me !

 $('#jstree_demo_div').jstree(true).deselect_all();
0
Ravindra Gupta On

for checking all the checkboxes

$("#jstree").jstree(true).check_all();

for unchecking all the checkboxes

$("#jstree").jstree(true).uncheck_all();