treeNode.isLastNode.html 1.1 KB

12345678910111213141516171819202122232425262728
  1. <div class="apiDetail">
  2. <div>
  3. <h2><span>Boolean</span><span class="path">treeNode.</span>isLastNode</h2>
  4. <h3>Overview<span class="h3_info">[ depends on <span class="highlight_green">jquery.ztree.core</span> js ]</span></h3>
  5. <div class="desc">
  6. <p></p>
  7. <div class="longdesc">
  8. <p>Judge whether the node is the sibling nodes's last node.</p>
  9. <p class="highlight_red">If you use the 'exhide' pack, so this attribute will only support the node which be shown. </p>
  10. <p class="highlight_red">Do not initialize or modify it, it is created by the zTree.</p>
  11. </div>
  12. </div>
  13. <h3>Boolean Format</h3>
  14. <div class="desc">
  15. <p> true means: the node is last node.</p>
  16. <p> false means: the node is not last node.</p>
  17. <p class="highlight_red">If the node has been hidden, isLastNode = false</p>
  18. </div>
  19. <h3>Examples of treeNode</h3>
  20. <h4>1. Judge whether the first selected node is the sibling nodes's last node.</h4>
  21. <pre xmlns=""><code>var treeObj = $.fn.zTree.getZTreeObj("tree");
  22. var sNodes = treeObj.getSelectedNodes();
  23. if (sNodes.length > 0) {
  24. var isLastNode = sNodes[0].isLastNode;
  25. }
  26. </code></pre>
  27. </div>
  28. </div>