zTreeObj.showNode.html 1.6 KB

12345678910111213141516171819202122232425262728293031323334
  1. <div class="apiDetail">
  2. <div>
  3. <h2><span>Function(treeNode)</span><span class="path">zTreeObj.</span>showNode</h2>
  4. <h3>Overview<span class="h3_info">[ depends on <span
  5. class="highlight_green">jquery.ztree.exhide</span> js ]</span></h3>
  6. <div class="desc">
  7. <p></p>
  8. <div class="longdesc">
  9. <p>To hide any node which be hidden.</p>
  10. <p class="highlight_red">1. This feature can't support the 'exedit' feature, so please don't use this
  11. feature in edit mode.</p>
  12. <p class="highlight_red">2. If you hide or show the nodes, it will effect the 'isFirstNode' and
  13. 'isLastNode' attribute.</p>
  14. <p class="highlight_red">3. Please use zTree object to executing the method.</p>
  15. </div>
  16. </div>
  17. <h3>Function Parameter Descriptions</h3>
  18. <div class="desc">
  19. <h4><b>treeNodes</b><span>Array(JSON)</span></h4>
  20. <p>JSON data object of the node to be shown</p>
  21. <p class="highlight_red">Please ensure that this data object is an internal node data object in zTree.</p>
  22. <h4 class="topLine"><b>Retrun </b><span>none</span></h4>
  23. <p>no return value</p>
  24. </div>
  25. <h3>Examples of function</h3>
  26. <h4>1. show someone node which be hidden.</h4>
  27. <pre xmlns=""><code>var treeObj = $.fn.zTree.getZTreeObj("tree");
  28. var node = treeObj.getNodeByParam("isHidden", true);
  29. if (node) {
  30. treeObj.showNode(node);
  31. }
  32. </code></pre>
  33. </div>
  34. </div>