我想让脚本无限循环,所以图像每次都会旋转。这是我的脚本不起作用:
function w_gore() {
if(document.getElementById('mycarousel').style.top != '-544px' && document.getElementById('up').align == 'left') {
document.getElementById('up').align = 'right';
$("#mycarousel").animate({"top": "-=136px"}, "slow", function() {
document.getElementById('up').align = 'left';
}, setTimeout(function() {ruch();},1000));
}
}
function ruch() {
w_gore();
}
$(document).ready(function(){
ruch();
});