report0, report0_c 设置滚动效果,其他的报表不设置
report0 js代码
setTimeout(function() {
//隐藏报表块report0的滚动条(此报表块名为report0,根据具体情况修改)
$("div").find(".frozen-north").style.overflow = "hidden";
$("div").find(".frozen-center").style.overflow = "hidden";
}, 100);
window.flag = true;
//鼠标悬停,滚动停止
setTimeout(function() {
$(".frozen-center").mouseover(function() {
window.flag = false;
});
//鼠标离开,继续滚动
$(".frozen-center").mouseleave(function() {
window.flag = true;
});
var old = -1;
var interval = setInterval(function() {
if(window.flag) {
currentpos = $(".frozen-center").scrollTop;
if(currentpos == old) {
$(".frozen-center").scrollTop = 0;
} else {
old = currentpos;
//以25ms的速度每次滚动1.5PX
$(".frozen-center").scrollTop = currentpos + 1.5;
}
}
}, 25);
}, 1000);
report0_c js 代码
setTimeout(function() {
//隐藏报表块report0_c的滚动条(此报表块名为report0_c,根据具体情况修改)
$("div").find(".frozen-north").style.overflow = "hidden";
$("div").find(".frozen-center").style.overflow = "hidden";
}, 100);
window.flag = true;
//鼠标悬停,滚动停止
setTimeout(function() {
$(".frozen-center").mouseover(function() {
window.flag = false;
});
//鼠标离开,继续滚动
$(".frozen-center").mouseleave(function() {
window.flag = true;
});
var old = -1;
var interval = setInterval(function() {
if(window.flag) {
currentpos = $("div").find(".frozen-center").scrollTop;
if(currentpos == old) {
$("div").find(".frozen-center").scrollTop = 0;
} else {
old = currentpos;
//以25ms的速度每次滚动1.5PX
$("div").find(".frozen-center").scrollTop = currentpos + 1.5;
}
}
}, 25);
}, 1000);