zTreeObj.getNodeByTId.html 1.3 KB

12345678910111213141516171819202122232425262728
  1. <div class="apiDetail">
  2. <div>
  3. <h2><span>Function(tId)</span><span class="path">zTreeObj.</span>getNodeByTId</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>According the unique identifier tId of zTree, quick get the node's JSON data object.</p>
  10. <p class="highlight_red">Get the node from the cache, don't need to search from all nodes.</p>
  11. <p class="highlight_red">Please use zTree object to executing the method.</p>
  12. </div>
  13. </div>
  14. <h3>Function Parameter Descriptions</h3>
  15. <div class="desc">
  16. <h4><b>tId</b><span>String</span></h4>
  17. <p>The unique identifier of node.</p>
  18. <h4 class="topLine"><b>Return </b><span>JSON</span></h4>
  19. <p>JSON data object of the node which be searched.</p>
  20. <p class="highlight_red">If no result, return null.</p>
  21. </div>
  22. <h3>Examples of function</h3>
  23. <h4>1. 1. Search the node which its 'tId' attribute is 'tree_10'</h4>
  24. <pre xmlns=""><code>var treeObj = $.fn.zTree.getZTreeObj("tree");
  25. var node = treeObj.getNodeByTId("tree_10");
  26. </code></pre>
  27. </div>
  28. </div>