I am trying to deselect the single selected node in dynatree on a button click. Here is my code :
$(function() {
$('#btnViewAll').on('click', function(e) {
$('#contents>div').show();
$("#tree").dynatree("getRoot").visit(function(node){
node.select(false);
});
});
});
This code goes through all the nodes but never deselects any anything. What am I missing?