0

我有这段代码:

$("#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(这不是很遗憾,这只是一个愿望)。第二个和第三个“循环”不是在正确的时间触发,而是在一分钟左右之后触发。是否有任何已知的行之有效的方法来克服这两个障碍并同时使代码不那么突兀?

4

1 回答 1

1

据我所知,jQuery UI 效果函数一次只产生一个效果 - 因此您指定的第二个参数实际上被解释为(显然)不存在的选项。

您的问题与问题类似,其中答案实际上结合了您尝试结合的两种效果。我相信这个问题的答案正是你所需要的。

于 2012-11-07T19:14:16.923 回答