treeNode.iconClose.html 1.6 KB

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