Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Fancytree jQuery plugin - select node

I have difficulties in selecting a given node from fancytree plugin.

So, I have tried something like:

$("#tree").fancytree("getTree").visit(function(node){
    node.select(n);
});

where "n" is any number representing the node id, but it doesn'work, even if the select() function exists in documentation

Could someone help?

like image 732
rosuandreimihai Avatar asked Dec 02 '14 20:12

rosuandreimihai


1 Answers

var tree = $("#tree").fancytree("getTree");
var node = tree.getNodeByKey(n);
node.setSelected(true);
like image 120
Rasheed Jahjah Avatar answered Oct 06 '22 11:10

Rasheed Jahjah