87,989
社区成员
发帖
与我相关
我的任务
分享
function nextPage(next = true) {
if (moving) {
return
}
moving = true;
var currentW = $list.position().left
var offset = next ? -IMG_WIDTH: IMG_WIDTH;
if (currentW == 0) {
currentW = -(listCount - 2) * IMG_WIDTH
$list.css("left", currentW)
} else if (currentW == -(listCount - 1) * IMG_WIDTH) {
currentW = -IMG_WIDTH
$list.css("left", currentW)
}
$list.animate({
left: currentW + offset + "px"
}, "slow", function() {
moving = false;
setTimeout(function() {
nextPage();
}, 400);
});
updatePoints(next);
}
setTimeout(function() {
nextPage();
}, 1000);