原先在10版本的js语句是这样的,在11版本下不能复用,可能是控件元素名称变更导致的,想请教大家有没有用11版本做过这个功能的 setTimeout(function() { //隐藏报表块REPORT2的滚动条(此报表块名为REPORT2,根据具体情况修改) $("div[widgetname=REPORT2]").find(".frozen-north").css({ 'overflow-x':'hidden', 'overflow-y':'hidden' }); $("div[widgetname=REPORT2]").find(".frozen-center").css({ 'overflow-x':'hidden', 'overflow-y':'hidden' });
},1000);
window.flag1 = true; var self1 = this; //鼠标悬停,滚动停止 setTimeout(function() { $("div[widgetname=REPORT2]").find(".frozen-center").mouseover(function() { window.flag1 = false; });
//鼠标离开,继续滚动 $("div[widgetname=REPORT2]").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=REPORT2]").find(".frozen-center")[0].scrollTop; if (currentpos1 == old && 0!=currentpos1) { $("div[widgetname=REPORT2]").find(".frozen-center")[0].scrollTop = 0; } else { old = currentpos1; //以25ms的速度每次滚动1.5PX $("div[widgetname=REPORT2]").find(".frozen-center")[0].scrollTop = currentpos1 + 1.5; } } }, 60); }, 1000); |