var t;
var hh;
function lunbo(obj, sobj, height) {
hh = 0;
clearInterval(t)
function tableLunbo1() {
var he = $(obj).find(sobj).length * height;
var h = he - $(obj).width();
hh += 1
if (hh >= (h - 4200)) {
hh = 0
clearInterval(t);
setTimeout(() => { //开始两秒
t = setInterval(tableLunbo1, 30)
}, 2000)
}
$(obj).scrollLeft(hh);
}
t = setInterval(tableLunbo1, 30)
$(obj).mouseenter(function () {
clearInterval(t)
})
$(obj).mouseleave(function () {
clearInterval(t)
t = setInterval(tableLunbo1, 30)
})
}
/**调用轮播方法 */
setTimeout(() => { //开始两秒
lunbo('.dsj_main_imgMoudle', '.dsj_main_img', 550);
}, 2000)
js 滚动横线
最新推荐文章于 2023-07-27 11:27:26 发布