setInterval(function(){ //REPORT_C放你的报表块名 $("div[widgetname=REPORT91]").find("tbody").children().eq(1).children().eq(1).children().css({"overflow-x":"hidden","overflow-y":"hidden"}); $("div[widgetname=REPORT91]").find("tbody").children().eq(0).children().eq(1).children().css({"overflow-x":"hidden","overflow-y":"hidden"}) }, 0);//重复运行的间隔时间为0 window.flag2 = true; //鼠标悬停,滚动停止 setTimeout(function() { $("div[widgetname=REPORT91").find(".frozen-center").mouseover(function() { window.flag2 = false; }); //鼠标离开,继续滚动 $("div[widgetname=REPORT91]").find(".frozen-center").mouseleave(function() { window.flag2 = true; }); var old = -1; var interval = setInterval(function() { if(window.flag2) { currentpos2 = $("div[widgetname=REPORT91]").find(".frozen-center")[0].scrollTop; if(currentpos2 == old) { $("div[widgetname=REPORT91]").find(".frozen-center")[0].scrollTop = 0; } else { old = currentpos2; //以25ms的速度每次滚动1.5PX $("div[widgetname=REPORT91]").find(".frozen-center")[0].scrollTop = currentpos2 + 1.5; } } }, 80); }, 1000) |
最佳回答 |
||||
0
|
|