treeNode.iconClose.html 1.4 KB

123456789101112131415161718192021222324252627282930313233
  1. <div class="apiDetail">
  2. <div>
  3. <h2><span>String</span><span class="path">treeNode.</span>iconClose</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>URL path of parent node's custom icon when it is collapsed.</p>
  9. <p class="highlight_red">1. Only parent node support this attribute.</p>
  10. <p class="highlight_red">2. This attribute must be used simultaneously with 'iconOpen' attribute.</p>
  11. <p class="highlight_red">3. If you need to use css to set the custom icon, please set the 'treeNode.iconSkin' attribute.</p>
  12. <p>Default: undefined</p>
  13. </div>
  14. </div>
  15. <h3>String Format</h3>
  16. <div class="desc">
  17. <p>Icon image url can be a relative path or absolute path.</p>
  18. <p class="highlight_red">If use a relative path, please note the relationship between icon image and the page, ensure the correct image path.</p>
  19. </div>
  20. <h3>Examples of treeNode</h3>
  21. <h4>1. Set the custom icon</h4>
  22. <pre xmlns=""><code>var nodes = [
  23. //Only show one icon when it is expanded or collapsed.
  24. { name:"Parent Node 1", icon:"/img/parent.gif"},
  25. //Show two icons when it is expanded or collapsed.
  26. { name:"Parent Node 2", iconOpen:"/img/open.gif", iconClose:"/img/close.gif"},
  27. //the custom icon for leaf node
  28. { name:"Leaf Node", icon:"/img/leaf.gif"}
  29. ]</code></pre>
  30. </div>
  31. </div>