0
效果多次我有這段代碼:多的jQuery在特定時間
$("#au").click(function(){
$("#sca").delay(18625).effect("bounce","highlight",2000);
$("#scb").delay(26520).effect("bounce","highlight",2000);
$("#scc").delay(30884).effect("bounce","highlight",2000);
$("#scd").delay(34901).effect("bounce","highlight",2000);
$("#sce").delay(39000).effect("bounce","highlight",2000);
$("#scf").delay(44000).effect("bounce","highlight",2000);
$("#scg").delay(45000).effect("bounce","highlight",2000);
$("#sca").delay(51000).effect("bounce","highlight",2000);
$("#scb").delay(52000).effect("bounce","highlight",2000);
$("#scc").delay(53000).effect("bounce","highlight",2000);
$("#scd").delay(55000).effect("bounce","highlight",2000);
$("#sce").delay(56000).effect("bounce","highlight",2000);
$("#scf").delay(57300).effect("bounce","highlight",2000);
$("#scg").delay(61403).effect("bounce","highlight",2000);
$("#sca").delay(67500).effect("bounce","highlight",2000);
$("#scb").delay(68200).effect("bounce","highlight",2000);
$("#scc").delay(69200).effect("bounce","highlight",2000);
$("#scd").delay(71400).effect("bounce","highlight",2000);
$("#sce").delay(72300).effect("bounce","highlight",2000);
$("#scf").delay(73000).effect("bounce","highlight",2000);
$("#scg").delay(77500).effect("bounce","highlight",2000);
$("#au-sca").get(0).play();
});
問題是,只有bounce
工作,不highlight
(不是這樣的遺憾,它只是一個願望)。第二個和第三個「循環」在正確的時間不會觸發,但是稍後一分鐘左右。是否有任何已知的方法可以克服這兩個障礙,同時使代碼變得不那麼突兀?
介意創建一個jsFiddle? – adamb
好吧,這是一首與一首歌同步的'動畫',但我無法在線播放它。 – user1718397
@ user1718397:你不必把整個事情放在線上,就足以證明你遇到的問題。除此之外,我認爲你會發現下面的Darrrrrren(或者說應該是很多的)應該有你的答案。 'effect'不允許你一次使用多個效果。 –