Fancytree jQuery plugin – select node

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

So, I have tried something like:

  • FancyTree load all nested children on select
  • Fancytree remove blue border when selected
  • Fancytree not visible has class ui-helper-hidden
  • How to set parent of children if the property `parent` is null
  • $("#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?

  • FancyTree load all nested children on select
  • How to set parent of children if the property `parent` is null
  • Fancytree not visible has class ui-helper-hidden
  • Fancytree remove blue border when selected
  • One Solution collect form web for “Fancytree jQuery plugin – select node”

    var tree = $("#tree").fancytree("getTree");
    var node = tree.getNodeByKey(n);
    node.setSelected(true);