In jquery dynatree , class for node is removed when I click on lazy node -


i using jquery-dynatree context-menu option.

for 1 of menu item on context-menu, need show entire sub-tree selection. i.e. selected node , children, able using below code :

node.visit(function(childnode){     $(childnode.span).addclass("copy");  // <== works }); 

now have 2 issues:

1) first issue have lazy node option, whenever click on menu-item, need show entire sub-tree selected, using below code

node.visit(function(childnode){     childnode.expand(true);  // <== works     $(childnode.span).addclass("copy"); // <== not work }); 

but not work fully, expands nodes upto level have initialized , after expansion not add required css class "copy" or children nodes.

2) second issue , once have manually expanded nodes , selected parent-node entire subtree shown using class "copy" , whenever click on parent lazy node retrieve children, "copy" class removed selected nodes

looking forward tips on solving this.

i have got solution 1st point, trying click on parent in collapsed mode, had first expand node before expanding children nodes.

 node.expand(true); // line missing, made things work                 node.visit(function(childnode){                     childnode.expand(true);                     $(childnode.span).addclass("copy");                 }); 

Comments

Popular posts from this blog

Why does Ruby on Rails generate add a blank line to the end of a file? -

keyboard - Smiles and long press feature in Android -

node.js - Bad Request - node js ajax post -