zTreeObj.getCheckedNodes.html 1.3 KB

12345678910111213141516171819202122232425262728
  1. <div class="apiDetail">
  2. <div>
  3. <h2><span>Function(checked)</span><span class="path">zTreeObj.</span>getCheckedNodes</h2>
  4. <h3>Overview<span class="h3_info">[ depends on <span class="highlight_green">jquery.ztree.excheck</span> js ]</span></h3>
  5. <div class="desc">
  6. <p></p>
  7. <div class="longdesc">
  8. <p>Get the collection of nodes which be checked or unchecked. It is valid when <span class="highlight_red">[setting.check.enable = true]</span></p>
  9. <p class="highlight_red">Please use zTree object to executing the method.</p>
  10. </div>
  11. </div>
  12. <h3>Function Parameter Descriptions</h3>
  13. <div class="desc">
  14. <h4><b>checked</b><span>Boolean</span></h4>
  15. <p>checked = true means: get the collection of nodes which be checked</p>
  16. <p>checked = false means: get the collection of nodes which be unchecked</p>
  17. <p class="highlight_red">If this parameter is omitted, it is same as 'checked = true'</p>
  18. <p class="highlight_red">Don't get the nodes which 'nochecked' attribute is true.</p>
  19. <h4 class="topLine"><b>Return </b><span>Array(JSON)</span></h4>
  20. <p>return the collection of nodes which be checked or unchecked. (Array)</p>
  21. </div>
  22. <h3>Examples of function</h3>
  23. <h4>1. Get the collection of nodes which be checked.</h4>
  24. <pre xmlns=""><code>var treeObj = $.fn.zTree.getZTreeObj("tree");
  25. var nodes = treeObj.getCheckedNodes(true);
  26. </code></pre>
  27. </div>
  28. </div>