NumbertreeNode.level

Overview[ depends on jquery.ztree.core js ]

The level of node

Do not initialize or modify it, it is created by the zTree.

Number Format

The root node's level = 0, and next level = 1, ...

Examples of treeNode

1. Get the first selected node's level

var treeObj = $.fn.zTree.getZTreeObj("tree");
var sNodes = treeObj.getSelectedNodes();
if (sNodes.length > 0) {
	var level = sNodes[0].level;
}