国内流行的内容管理系统(CMS)多端全媒体解决方案 https://www.dedebiz.com
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

44 lines
1.3KB

  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="utf-8">
  5. <meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1">
  6. <title>系统菜单</title>
  7. <link rel="stylesheet" href="../static/web/font/css/font-awesome.min.css">
  8. <link rel="stylesheet" href="../static/web/css/admin.css">
  9. <script src="../static/web/js/jquery.min.js"></script>
  10. </head>
  11. <body class="menu-box">
  12. <ul id="menu" class="menu">
  13. <?php
  14. $openitem=100;
  15. GetMenus($cuserLogin->getUserRank(),'main');
  16. ?>
  17. </ul>
  18. <script>
  19. $(function() {
  20. var menu = function(el, multiple) {
  21. this.el = el || {};
  22. this.multiple = multiple || false;
  23. var links = this.el.find('.link');
  24. links.on('click', {el: this.el, multiple: this.multiple}, this.dropdown)
  25. }
  26. menu.prototype.dropdown = function(e) {
  27. var $el = e.data.el;
  28. $this = $(this),
  29. $next = $this.next();
  30. $next.slideToggle();
  31. $this.parent().toggleClass('open');
  32. if (!e.data.multiple) {
  33. $el.find('.submenu').not($next).slideUp().parent().removeClass('open');
  34. };
  35. }
  36. var menu = new menu($('#menu'), false);
  37. $(".submenu li a").click(function(e) {
  38. $(".submenu li").removeClass('active');
  39. $(this).parent().addClass('active');
  40. })
  41. });
  42. </script>
  43. </body>
  44. </html>