我面临着将jstree绑定到on-expand/on-collapse事件的困难.我目前正在将jstree绑定到selected_node事件,如下所示:
$(function () {
$("#tree").jstree({
"json_data" : {
"data" : [
{
data : "/",
attr : { "id" : "root"},
state : "closed",
"children" : [ { "data" : "child1",
"attr" : { "id" : "child1.id" },
"children" : [ ] }
]
},
]
},
"plugins" : [ "themes", "json_data", "crrm", "ui" ]
})
.bind("select_node.jstree",function(event, data) { . . . }
Run Code Online (Sandbox Code Playgroud)
我现在正在{...}中为on-expand/on-collapse事件寻找相同的事件处理功能.需要帮助来弄清楚如何做到这一点.