Open branch when clicking on a node?

后端 未结 3 433
抹茶落季
抹茶落季 2021-02-02 09:52

I\'m stuck with jsTree here. So far it works and i can browse and expand nodes with the [+] icon and open pages when clicking a node, BUT i still want it to expand all the immed

3条回答
  •  渐次进展
    2021-02-02 10:14

    With a newer version of jsTree (3.0.0 according to jsTree.js), i had to change the code provided by @justind a bit to work:

    $("#jstree").bind("select_node.jstree", function (e, data) {
        return data.instance.toggle_node(data.node);
    });
    

提交回复
热议问题