3

I am facing difficulty to bind jstree with an on-expand/on-collapse event. I am currently binding the jstree with selected_node event like this :

$(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) { . . . }

I am now looking for the same event handling functionality within {...} for on-expand/on-collapse event as well. Need help to figure out how can that be done.

4

2 に答える 2

5
.on('open_node.jstree', ....);

.on('close_node.jstree', ....);
于 2013-09-18T17:48:19.867 に答える