2013-03-16 60 views

回答

36

delay只有动画方法的工作原理,你可以使用setTimeout功能:

$("#info-text-container").click(function(){ 
    setTimeout(function(){ 
     $("#info-text").addClass("info-text-active"); 
    }, 500); 
}); 
33

不太一样,但像这样的例子:

$("#info-text").delay(500).queue(function(next) { 
    $(this).addClass("info-text-active"); 
    next(); 
}); 
+0

谢谢,但上面有点答案对我来说更好一点。你虽然有一个向上的箭头;) – user2097217 2013-03-16 20:21:44