Pergunta

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

Foi útil?

Solução

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

$("#tree").dynatree("getRoot").visit(function(node){
   node.select(false);
});
Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top