初始化页面过后如果不刷新报表块的话,滚动条一直是隐藏的。使用插件刷新报表块内容后滚动条就又出来了。怎么才能让报表内容刷新过后滚动条也隐藏 报表块的初始化事件JS: setTimeout(function() { $("div[widgetname=REPORT0]").find(".frozen-center")[0].style.overflow = "hidden"; $("div[widgetname=REPORT0]").find(".frozen-north")[0].style.overflow = "hidden"; },1000); window.flag1 = true; var self1 = this; //鼠标悬停,滚动停止 setTimeout(function() { $("div[widgetname=REPORT0]").find(".frozen-center").mouseover(function() { window.flag1 = false; }); //鼠标离开,继续滚动 $("div[widgetname=REPORT0]").find(".frozen-center").mouseleave(function() { window.flag1 = true; }); var old = -1; var interval = setInterval(function() { if (!self1.isVisible()) { return; } if (window.flag1) { currentpos1 = $("div[widgetname=REPORT0]").find(".frozen-center")[0].scrollTop; if (currentpos1 == old && 0!=currentpos1) { $("div[widgetname=REPORT0]").find(".frozen-center")[0].scrollTop = 0; } else { old = currentpos1; //以25ms的速度每次滚动1.5PX $("div[widgetname=REPORT0]").find(".frozen-center")[0].scrollTop = currentpos1 + 1.5; } } }, 100); }, 1000); |