Как я могу получить степень/уровень текущего выбранного узла? т.е. количество родителей, которые у него есть.
У меня есть раздел, который выполняется при выборе узла как такового:
.bind("select_node.jstree", function (event, data) {
var nodeInfo = $("#" + data.rslt.obj.attr("id"));
console.log(data.rslt.obj.attr("id")); // the id of the node
console.log(nodeInfo.children("a").text()); // the name of the node
// the level of the node???
});