国内流行的内容管理系统(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.

153 lines
4.1KB

  1. < !--
  2. var $ = jQuery;
  3. var thespeed = 5;
  4. var navIE = document.all && navigator.userAgent.indexOf("Firefox") == -1;
  5. var myspeed = 0;
  6. $(function () {
  7. //快捷菜单
  8. bindQuickMenu();
  9. //左侧菜单开关
  10. LeftMenuToggle();
  11. //全部功能开关
  12. AllMenuToggle();
  13. //取消菜单链接虚线
  14. $(".head").find("a").click(function () { $(this).blur() });
  15. $(".menu").find("a").click(function () { $(this).blur() });
  16. }).keydown(function (event) {//快捷键
  17. if (event.keyCode == 116) {
  18. //url = $("#main").attr("src");
  19. //main.location.href = url;
  20. //return false;
  21. }
  22. if (event.keyCode == 27) {
  23. $("#qucikmenu").slideToggle("fast")
  24. }
  25. });
  26. function bindQuickMenu() {//快捷菜单
  27. $("#ac_qucikmenu").bind("mouseenter", function () {
  28. $("#qucikmenu").slideDown("fast");
  29. }).dblclick(function () {
  30. $("#qucikmenu").slideToggle("fast");
  31. }).bind("mouseleave", function () {
  32. hidequcikmenu = setTimeout('$("#qucikmenu").slideUp("fast");', 700);
  33. $(this).bind("mouseenter", function () { clearTimeout(hidequcikmenu); });
  34. });
  35. $("#qucikmenu").bind("mouseleave", function () {
  36. hidequcikmenu = setTimeout('$("#qucikmenu").slideUp("fast");', 700);
  37. $(this).bind("mouseenter", function () { clearTimeout(hidequcikmenu); });
  38. }).find("a").click(function () {
  39. $(this).blur();
  40. $("#qucikmenu").slideUp("fast");
  41. //$("#ac_qucikmenu").text($(this).text());
  42. });
  43. }
  44. function LeftMenuToggle() {//左侧菜单开关
  45. $("#togglemenu").click(function () {
  46. if ($("body").attr("class") == "showmenu") {
  47. $("body").attr("class", "hidemenu");
  48. $(this).html("显示菜单");
  49. } else {
  50. $("body").attr("class", "showmenu");
  51. $(this).html("隐藏菜单");
  52. }
  53. });
  54. }
  55. function AllMenuToggle() {//全部功能开关
  56. mask = $(".pagemask,.iframemask,.allmenu");
  57. $("#allmenu").click(function () {
  58. mask.show();
  59. });
  60. //mask.mousedown(function(){alert("123");});
  61. mask.click(function () { mask.hide(); });
  62. }
  63. function AC(act) {
  64. //alert(act);
  65. mlink = $("a[id='" + act + "']");
  66. if (mlink.size() > 0) {
  67. box = mlink.parents("div[id^='menu_']");
  68. boxid = box.attr("id").substring(5, 128);
  69. if ($("body").attr("class") != "showmenu") $("#togglemenu").click();
  70. if (mlink.attr("_url")) {
  71. $("#menu").find("div[id^=menu]").hide();
  72. box.show();
  73. mlink.addClass("thisclass").blur().parents("#menu").find("ul li a").not(mlink).removeClass("thisclass");
  74. if ($("#mod_" + boxid).attr("class") == "") {
  75. $("#nav").find("a").removeClass("thisclass");
  76. $("#nav").find("a[id='mod_" + boxid + "']").addClass("thisclass").blur();
  77. }
  78. main.location.href = mlink.attr("_url");
  79. } else if (mlink.attr("_open") && mlink.attr("_open") != undefined) {
  80. window.open(mlink.attr("_open"));
  81. }
  82. }
  83. }
  84. /*********************
  85. * 滚动按钮设置
  86. *********************/
  87. function scrollwindow() {
  88. parent.frames['menu'].scrollBy(0, myspeed);
  89. }
  90. function initializeIT() {
  91. if (myspeed != 0) {
  92. scrollwindow();
  93. }
  94. }
  95. //滚动插件
  96. /*
  97. (function($){
  98. $.fn.extend({
  99. Scroll:function(opt,callback){
  100. //参数初始化
  101. if(!opt) var opt={};
  102. var _this=this.eq(0).find("ul:first");
  103. var lineH=_this.find("li:first").height(), //获取行高
  104. line=opt.line?parseInt(opt.line,10):parseInt(this.height()/lineH,10), //每次滚动的行数,默认为一屏,即父容器高度
  105. speed=opt.speed?parseInt(opt.speed,10):500, //卷动速度,数值越大,速度越慢(毫秒)
  106. timer=opt.timer?parseInt(opt.timer,10):3000; //滚动的时间间隔(毫秒)
  107. if(line==0) line=1;
  108. var upHeight=0-line*lineH;
  109. //滚动函数
  110. scrollUp=function(){
  111. _this.animate({
  112. marginTop:upHeight
  113. },speed,function(){
  114. for(i=1;i<=line;i++){
  115. _this.find("li:first").appendTo(_this);
  116. }
  117. _this.css({marginTop:0});
  118. });
  119. }
  120. //鼠标事件绑定
  121. var timerID;
  122. timerID=setInterval("scrollUp()",timer);
  123. _this.mouseover(function(){
  124. clearInterval(timerID);
  125. }).mouseout(function(){
  126. timerID=setInterval("scrollUp()",timer);
  127. });
  128. }
  129. })
  130. })(jQuery);
  131. */
  132. -->