title: jsTree : How to get IDs of selected nodes to root node in jsTree?
body: <p>How to get IDs of selected nodes to  root node in jsTree?</p>
  
  <p>Assume C is selected node then How can I get All parent IDs of C.</p>
  
  <p>A</p>
  
  <ul>
  <li><p>B</p>
  
  <ul>
  <li><p>C</p>
  
  <p>+C1</p>
  
  <p>+c2</p></li>
  </ul></li>
  </ul>
  
  <p>Following code will return only immediate parent ID:
  If I selected <strong>C</strong> then I get only <strong>B</strong></p>
  
  <pre><code> .bind("select_node.jstree", function (event, data) {  
      //`data.rslt.obj` is the jquery extended node that was clicked          
      alert("Selected node = "+ data.rslt.obj.attr("id"));
      alert("Parent of Selected node = "+ data.inst._get_parent(data.rslt.obj).attr("id"))
   });
  </code></pre>
  
  <p>Output:</p>
  
  <p><code>Selected node = C</code></p>
  
  <p><code>Parent of Selected node = B</code></p>
  
  <p>Is there any way to get all parent nodes ID i.e. Selected node to root node ?</p>
  
  <ul>
  <li>How to get all child nodes of selected node in jsTree ?</li>
  </ul>
  
  <p>Any help or guidance in this matter would be appreciated. </p>