I'm trying to copy all selected nodes from one fancytree control to another one on the same page. So far I've tried the following code but the second tree remains blank:
var sourceTree= $("#tree").fancytree("getTree");
var destinationTree= $("#destinationTree").fancytree("getTree");
var selectedNodes = sourceTree.getSelectedNodes();
var rootNode = destinationTree.rootNode;
rootNode.addChildren(selectedNodes);
Any ideas?
Thanks
addChildren
expects a plain object, so you could tryor