I am using the following code:
$("#treeview").jstree();
$("#treeview").jstree(\'open_all\');
With the following html:
If you want open all node when tree loaded:
$("#treeview")
// call `.jstree` with the options object
.jstree({
"plugins" : ["themes", "html_data","ui","crrm","sort"]
})
.bind("loaded.jstree", function (event, data) {
// you get two params - event & data - check the core docs for a detailed description
$(this).jstree("open_all");
})
});