treeNode.parentTId.html 1.4 KB

123456789101112131415161718192021222324252627282930
  1. <div class="apiDetail">
  2. <div>
  3. <h2><span>String</span><span class="path">treeNode.</span>parentTId</h2>
  4. <h3>Overview<span class="h3_info">[ depends on <span
  5. class="highlight_green">jquery.ztree.core</span> js ]</span></h3>
  6. <div class="desc">
  7. <p></p>
  8. <div class="longdesc">
  9. <p>The unique identifier of node's parent node.</p>
  10. <p class="highlight_red">1. zTree v3.x using 'parentTId' replaced the original 'parentNode' attribute,
  11. and increased getParentNode () method, in order to avoid the original 'parentNode' cause the clone
  12. () method infinite loop.</p>
  13. <p class="highlight_red">2. Do not initialize or modify it, it is created by the zTree.</p>
  14. </div>
  15. </div>
  16. <h3>String Format</h3>
  17. <div class="desc">
  18. <p>String object of node's parent node's tId. please see API about 'treeNode.tId'</p>
  19. <p class="highlight_red">If treeNode is root node, parentTId is null.</p>
  20. </div>
  21. <h3>Examples of treeNode</h3>
  22. <h4>1. Get the first selected node's parent node's tId</h4>
  23. <pre xmlns=""><code>var treeObj = $.fn.zTree.getZTreeObj("tree");
  24. var sNodes = treeObj.getSelectedNodes();
  25. if (sNodes.length > 0) {
  26. var parentTId = sNodes[0].parentTId;
  27. }
  28. </code></pre>
  29. </div>
  30. </div>