JsTree Open a node then select a child node (using json_result)

后端 未结 3 474
星月不相逢
星月不相逢 2021-01-05 11:56

I am having trouble with a JsTree I am using in an MVC2 project. I would like to create a function to deselect/close all nodes on the tree. Then open a specific node, and se

3条回答
  •  渐次进展
    2021-01-05 12:16

    You could try passing a function that selects the node as a callback like:

    $('#demo3').jstree('open_node', '#ParentID', function(e, data) {
        $('#demo3').jstree('select_node', '#ChildId');
    }, true);
    

    This way select_node will be called once the open_node returns success.

提交回复
热议问题