icon.htm 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  2. <html xmlns="http://www.w3.org/1999/xhtml">
  3. <head>
  4. <title></title>
  5. <script src="../../lib/jquery/jquery-1.3.2.min.js" type="text/javascript"></script>
  6. <link href="../../lib/ligerUI/skins/Aqua/css/ligerui-all.css" rel="stylesheet" type="text/css" />
  7. <script src="../../lib/ligerUI/js/core/base.js" type="text/javascript"></script>
  8. <script src="../../lib/ligerUI/js/plugins/ligerTree.js" type="text/javascript"></script>
  9. <style type="text/css">
  10. .l-tree .l-tree-icon-none img{width:16px; height:16px; margin:3px;}
  11. </style>
  12. <script type="text/javascript">
  13. $(function ()
  14. {
  15. var myaccount = '../../lib/ligerUI/skins/icons/myaccount.gif';
  16. var memeber = '../../lib/ligerUI/skins/icons/memeber.gif';
  17. var archives = '../../lib/ligerUI/skins/icons/archives.gif';
  18. $("#tree1").ligerTree({
  19. data: [
  20. { text: '节点1', icon: myaccount, children: [
  21. { text: '节点1.1', icon: archives },
  22. { text: '节点1.2', icon: archives },
  23. { text: '节点1.3', icon: myaccount, children: [
  24. { text: '节点1.3.1', icon: archives },
  25. { text: '节点1.3.2', icon: archives }
  26. ]
  27. },
  28. { text: '节点1.4', icon: archives }
  29. ]
  30. },
  31. { text: '节点2', icon: memeber },
  32. { text: '节点3', icon: memeber },
  33. { text: '节点4', icon: memeber }
  34. ]
  35. });
  36. });
  37. </script>
  38. </head>
  39. <body style="padding: 10px">
  40. <div style="width: 200px; height: 300px; margin: 10px; float: left; border: 1px solid #ccc;
  41. overflow: auto;">
  42. <ul id="tree1">
  43. </ul>
  44. </div>
  45. <div style="display: none">
  46. </div>
  47. </body>
  48. </html>