KnowledgeOverflow KnowledgeOverflow - 1 year ago 74
Javascript Question

How to loop over all the nodes of a jstree

I am unable to figure out how I can loop over all the nodes of a jstree.

What I am looking for is that for the jstree

. I want to loop over all of its children and sub-children and print/get the
of each leaf.


Answer Source

This is how I solved my problem

$(function () {
    $.each($("#jstree1").jstree('full').find("li"), function (index, element) 
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download