how to deselect all element in jquery?
javascript, jquery, jstree
Solution
Try this code:
$('#tree').jstree("deselect_all");
Insted of
$('#tree').deselect_all(true)
Here is Updated fiddle
Problem
I want to deselect (remove selected element ).I am using jstree in my demo .So I read the plugin api . http://www.jstree.com/api/#/?f=deselect_all([supress_event]). But it not deleselect the selected item. I follow the these steps 1) Click the "b" node.then "b" node is selected. 2) Then press "deselect" button but it not deselect the items. ``` $('#deselect').click(function(){ alert('--') $('#tree').deselect_all(true) }) ``` http://jsfiddle.net/fuu94/150/