niao
niao

Reputation: 5070

jsTree Selecte most nested node

Greetings, I just started to use jsTree and I have a question for you guys. How can I select only the most nested node - the node which doesn't have any children. additionally, when this node is selected, I would like to submit my form which contains the jsTree. How can I then access selected node?

Upvotes: 0

Views: 341

Answers (1)

Master Morality
Master Morality

Reputation: 5907

It might be easier to grab the nodes with jQuery:

myTree.find('li').has(':not(ul)');

Upvotes: 1

Related Questions