radio_nocheck.html 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. <!DOCTYPE html>
  2. <HTML>
  3. <HEAD>
  4. <TITLE> ZTREE DEMO - no radio</TITLE>
  5. <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  6. <link rel="stylesheet" href="../../../css/demo.css" type="text/css">
  7. <link rel="stylesheet" href="../../../css/zTreeStyle/zTreeStyle.css" type="text/css">
  8. <script type="text/javascript" src="../../../js/jquery.min.js"></script>
  9. <!-- <script type="text/javascript" src="../../../js/jquery-1.4.4.min.js"></script>-->
  10. <script type="text/javascript" src="../../../js/jquery.ztree.core.js"></script>
  11. <script type="text/javascript" src="../../../js/jquery.ztree.excheck.js"></script>
  12. <!--
  13. <script type="text/javascript" src="../../../js/jquery.ztree.exedit.js"></script>
  14. -->
  15. <SCRIPT type="text/javascript">
  16. <!--
  17. var setting = {
  18. check: {
  19. enable: true,
  20. chkStyle: "radio",
  21. radioType: "level"
  22. },
  23. data: {
  24. simpleData: {
  25. enable: true
  26. }
  27. }
  28. };
  29. var zNodes =[
  30. { id:1, pId:0, name:"can check 1", open:true},
  31. { id:11, pId:1, name:"can check 1-1", open:true},
  32. { id:111, pId:11, name:"no radio 1-1-1", nocheck:true},
  33. { id:112, pId:11, name:"can check 1-1-2"},
  34. { id:12, pId:1, name:"no radio 1-2", nocheck:true, open:true},
  35. { id:121, pId:12, name:"no radio 1-2-1"},
  36. { id:122, pId:12, name:"no radio 1-2-2"},
  37. { id:2, pId:0, name:"can check 2", checked:true, open:true},
  38. { id:21, pId:2, name:"can check 2-1"},
  39. { id:22, pId:2, name:"can check 2-2", open:true},
  40. { id:221, pId:22, name:"can check 2-2-1", checked:true},
  41. { id:222, pId:22, name:"can check 2-2-2"},
  42. { id:23, pId:2, name:"can check 2-3"}
  43. ];
  44. $(document).ready(function(){
  45. $.fn.zTree.init($("#treeDemo"), setting, zNodes);
  46. });
  47. //-->
  48. </SCRIPT>
  49. </HEAD>
  50. <BODY>
  51. <h1>Radio nocheck Demo</h1>
  52. <h6>[ File Path: excheck/radio_nocheck.html ]</h6>
  53. <div class="content_wrap">
  54. <div class="zTreeDemoBackground left">
  55. <ul id="treeDemo" class="ztree"></ul>
  56. </div>
  57. <div class="right">
  58. <ul class="info">
  59. <li class="title"><h2>1, Explanation of setting</h2>
  60. <ul class="list">
  61. <li>This Demo only shows how use the ‘nocheck’ attribute, detailed configuration information, please refer to 'Radio Operation'</li>
  62. <li class="highlight_red">setting.check.nocheckInherit can set the child nodes to automatically inherit the parent node's 'nocheck' attribute. See the API documentation for more related contents.</li>
  63. </ul>
  64. </li>
  65. <li class="title"><h2>2, Explanation of treeNode</h2>
  66. <ul class="list">
  67. <li class="highlight_red">1), If you need to initialize the node don't show radio, please set treeNode.nocheck attribute. See the API documentation for more related contents.</li>
  68. <li>2), By the way, please see the 'Radio Operation' Demo.</li>
  69. </ul>
  70. </li>
  71. </ul>
  72. </div>
  73. </div>
  74. </BODY>
  75. </HTML>