treeNode.click.html 1.5 KB

123456789101112131415161718192021222324252627282930
  1. <div class="apiDetail">
  2. <div>
  3. <h2><span>String</span><span class="path">treeNode.</span>click</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>Simple click event operations. As same as : (onclick ="...") the code. If the operation is more
  10. complex, please use the onClick callback.</p>
  11. <p class="highlight_red">Because IE is different to other browsers in operating the event of ‘onclick’
  12. and ‘click’ coexistence, please do not use this parameter to control whether to allow the
  13. redirection operation (for example: treeNode.click = "return false;"). If there is similar
  14. requirements, please do not use the 'url' attribute to save the website address, but use the
  15. 'onClick' callback to control jumps.</p>
  16. <p>Default: undefined</p>
  17. </div>
  18. </div>
  19. <h3>String Format</h3>
  20. <div class="desc">
  21. <p>Standard javascript syntax, for example: alert ("test"); etc.</p>
  22. </div>
  23. <h3>Examples of treeNode</h3>
  24. <h4>1. When click this node, will alert msg.</h4>
  25. <pre xmlns=""><code>var nodes = [
  26. { "id":1, "name":"Google CN", "url":"http://g.cn", "click":"alert('test');"},
  27. ......
  28. ]</code></pre>
  29. </div>
  30. </div>