Click on a node don't uncheck again?
When I click on a node is selected and highlighted , I once again click on the node is selected and highlighted again. what i need is do not selected and highlighted again the node even though i select the same node unless select another node then the previous node is un selected
Can you help me please.
You could override the tree.click event:
$tree.on('tree.click', function(e) {
e.preventDefault();
var node = e.node;
if ($tree.tree('isNodeSelected', node)) {
$tree.tree('selectNode', null);
}
else {
$tree.tree('selectNode', node);
}
});
i mean when select the same node more then one times the node highlighted first and on second click is un highlighted . So if possible to do the following: first click on the node #1, the hode is selected and highlighted then click on node #1 do not un highlighted should be stay highlighted.
Sorry, my error. I think this is the solution:
$tree.on('tree.click', function(e) {
e.preventDefault();
$tree.tree('selectNode', e.node);
});
Thanks, it looks fine now.