zTreeObj.expandAll.html 1.2 KB

123456789101112131415161718192021222324252627282930
  1. <div class="apiDetail">
  2. <div>
  3. <h2><span>Function(expandFlag)</span><span class="path">zTreeObj.</span>expandAll</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>Expand or collapse all nodes.</p>
  9. <p class="highlight_red">This method does not trigger 'beforeExpand / onExpand' or 'beforeCollapse / onCollapse' callback function.</p>
  10. <p class="highlight_red">Please use zTree object to executing the method.</p>
  11. </div>
  12. </div>
  13. <h3>Function Parameter Descriptions</h3>
  14. <div class="desc">
  15. <h4><b>expandFlag</b><span>Boolean</span></h4>
  16. <p>expandFlag = true means: expand all nodes.</p>
  17. <p>expandFlag = false means: collapse all nodes.</p>
  18. <h4 class="topLine"><b>Return </b><span>Boolean</span></h4>
  19. <p>return the result of expand or collapse.</p>
  20. <p>true means: expand all nodes</p>
  21. <p>false means: collapse all nodes</p>
  22. <p>null means: have no parent node to expand or collapse.</p>
  23. </div>
  24. <h3>Examples of function</h3>
  25. <h4>1. Expand all nodes</h4>
  26. <pre xmlns=""><code>var treeObj = $.fn.zTree.getZTreeObj("tree");
  27. treeObj.expandAll(true);
  28. </code></pre>
  29. </div>
  30. </div>