fn.zTree.getZTreeObj.html 1.2 KB

123456789101112131415161718192021222324252627
  1. <div class="apiDetail">
  2. <div>
  3. <h2><span>Function(treeId)</span><span class="path">$.fn.zTree.</span>getZTreeObj</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>zTree v3.x provides this method to get zTree object from the tree's Id.</p>
  9. <p class="highlight_red">Please initialize zTree first, then you can use this method.</p>
  10. <p>Users don't need to use a global variable to reference the zTree object,
  11. as all of the callback methods will pass 'treeId' parameters,
  12. and you can always call this method to get the zTree object.</p>
  13. </div>
  14. </div>
  15. <h3>Function Parameter Descriptions</h3>
  16. <div class="desc">
  17. <h4><b>treeId</b><span>String</span></h4>
  18. <p>zTree unique identifier</p>
  19. <h4 class="topLine"><b>Return </b><span>JSON</span></h4>
  20. <p>zTree object</p>
  21. <p>This is a reference to the zTree object.</p>
  22. </div>
  23. <h3>Examples of function</h3>
  24. <h4>1. Get the zTree object with id='tree'</h4>
  25. <pre xmlns=""><code>var treeObj = $.fn.zTree.getZTreeObj("tree");</code></pre>
  26. </div>
  27. </div>