I am using jstree and populating the data using JSON. Now i would like to capture event of each node when it checked.
$("#" +newTreeDiv).bind("check_node.jstree", function (e, d) {
var tagName = d.args[0].tagName;
var refreshing = d.inst.data.core.refreshing;
if ((tagName == "A" || tagName == "INS") &&
(refreshing != true && refreshing != "undefined")) {
alert(d.inst.get_checked().attr('path'));
}
});
In the above case, if i select two nodes it always gives the 'path' of first node. e.g. Refer to the below image, if i try to select 'tags' or 'trunk' it always gives me the 'path' of 'branches' which i have selected at the beginning.
Aucun commentaire:
Enregistrer un commentaire