0

I'm using jsTree plugin for creating a tree of items. I need to make some actions before node opens, but I don't know which event is fired before node opening.

When node finished opening, jsTree plugin fires event 'open_node.jstree'. Maybe there are some event which is fired before node opens?

4

1 回答 1

1
$(function () {
    $("#demo2").bind("before.jstree", function (e, data) {
        if(data.func === "open_node") {
            $("#log2").html(data.args[0].attr("id"));
            e.stopImmediatePropagation();
            return false;
        }
    });
});

reference: http://www.jstree.com/documentation/core#
于 2013-09-06T08:21:41.833 回答