1
我在一個頁面上有6個jQuery循環,我希望第一個循環改變然後暫停,然後我希望第二個循環在幾秒鐘後暫停並等待直到最後一個循環,然後再次返回到開始。jQuery Cycle2同步多個幻燈片以逐個運行
我看到的東西有人貼過,但它並沒有在我的代碼工作:
$('.cycle').each(function(){
$(this).cycle({
delay: -8000 + (2000 * (i+1)),
timeout: 8000
});
});
我的代碼是:
<div class="cycle">
<img alt="" src="_assets/images/one.png">
<img alt="" src="_assets/images/two.png">
<img alt="" src="_assets/images/three.png">
</div>
<div class="cycle">
<img alt="" src="_assets/images/two.png">
<img alt="" src="_assets/images/three.png">
<img alt="" src="_assets/images/one.png">
</div>
<div class="cycle">
<img alt="" src="_assets/images/three.png">
<img alt="" src="_assets/images/one.png">
<img alt="" src="_assets/images/two.png">
</div>