How do I open all nodes in jquery Jstree?

前端 未结 9 1754
感情败类
感情败类 2021-02-05 00:07

I am using the following code:

$("#treeview").jstree();
$("#treeview").jstree(\'open_all\');

With the following html:

9条回答
  •  攒了一身酷
    2021-02-05 00:44

    .bind("loaded.jstree", function (event, data) {
            // you get two params - event & data - check the core docs for a detailed description
            $(this).jstree("open_all");
        }) 
    

提交回复
热议问题