setTimeout(function() {
var $report = $("div[widgetname=REPORT110]");
//获取对应report的div元素
var $scroll = $report.find("#frozen-center");
//获取对应report的div元素的滚动块元素,冻结为#frozen-center,未冻结且未安装自定义滚动条插件为.reportContent,未冻结且安装了自定义滚动条插件为.scrollDiv
var flag = window.flag3;
//设置全局变量flag,每个报表块需保证各不相同
$report.find("#frozen-center").css('overflow-x', 'hidden');
$report.find("#frozen-center").css('overflow-y', 'hidden');
$report.find("#frozen-north").css('overflow-x', 'hidden');
$report.find("#frozen-north").css('overflow-y', 'hidden');
//冻结情况下隐藏滚动条
$report.find(".reportContent").css('overflow-y', 'hidden');
$report.find(".reportContent").css('overflow-x', 'hidden');
//非冻结情况下隐藏滚动条
flag = true;
//定义全局参数flag,用来控制滚动的暂停和继续
$scroll.mouseover(function() {
flag = false;
})
//鼠标悬浮,滚动停止
$scroll.mouseleave(function() {
flag = true;
})
//鼠标离开,继续滚动
var old = -1;
setInterval(function() {
if (flag) {
currentpos1 = $report.find(".frozen-center")[0].scrollTop;
if (currentpos1 == old && 0 != currentpos1) {
$report.find(".frozen-center")[0].scrollTop = 0;
} else {
old = currentpos1;
$report.find(".frozen-center")[0].scrollTop = currentpos1 + 1.5;
}
}
}, 200);
//以25ms的频率执行
}, 500);