Question

I'm trying to deselect the current node in a dynatree.

node.deactivate(); // doesn't work
node.focus(false); // doesn't exist

I tried to remove the classes that highlight the focused/activated node :

This worked but destroy the complete CSS of the tree :

$("#tree span").removeClass(); 

But this did NOT work, and I checked carefully the class names :

$("#tree span").removeClass("dynatree-active dynatree-focused"); 

Question is : how to deselect an active node, at least by removing the visual highlight ? Thx

Was it helpful?

Solution

deactivate() doesn't work for me, I give you my alternative solution:

$("#tree").dynatree("getRoot").visit(function(node){
   node.select(false);
});
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top