문제

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

도움이 되었습니까?

해결책

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

$("#tree").dynatree("getRoot").visit(function(node){
   node.select(false);
});
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top