小编RAh*_*hul的帖子

在扩展和崩溃事件上与jstree绑定

我面临着将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事件寻找相同的事件处理功能.需要帮助来弄清楚如何做到这一点.

javascript jquery jstree

2
推荐指数
1
解决办法
9025
查看次数

标签 统计

javascript ×1

jquery ×1

jstree ×1