我正在尝试延迟打开颜色框,但如果存在延迟,它根本不会运行。我已经尝试了很多东西,但我被卡住了。任何人都知道如何在第一个动画运行时让颜色框暂停?这是 6000 毫秒,但我希望彩盒从 3000 毫秒开始。
谢谢!
这有效:
$(document).ready(function(){
$('a[data-test]').click(function(){
var anim = $(this).attr('data-test');
buttonAnim(anim);
$.colorbox({href:"contact/index.html"});
;})
这有效,但延迟为 0ms:
$(document).ready(function(){
$('a[data-test]').click(function(){
var anim = $(this).attr('data-test');
buttonAnim(anim);
$('a[data-test]').delay(3000).colorbox({href:"contact/index.html"});
;})