zTreeObj.expandAll.html 1.5 KB

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