I have a jsTree (with checkbox) as follows and wish to return node level value of any checked item:
- Group 1
- Group 1 A
- Group 1 B
- Group 1 C
- Group 1 A A
- Group 2
The node level for Groups 1 and 2 would be 1
and for Group 1 A, B and C would be 2
and for Group 1 A A would be 3
However, I cannot fathom how to return this value, tried but no joy:
$('#jstree_demo_div').jstree(true).get_node.length;
Any suggestions welcomed!
Aucun commentaire:
Enregistrer un commentaire