我想在与 Img1 动画绑定(bind)完成的函数执行之前设置延迟。
$(document).ready(function(){
$("#Img1").bind.('animationend webkitAnimationEnd', function() {
$("#Img2").addClass("fadeOutRight animated");enter code here
});
});
最佳答案
如果我没理解错的话,你想延迟 addClass 对吧?
$(document).ready(function(){
$("#Img1").bind.('animationend webkitAnimationEnd', function() {
var delay = 500; // delay in milliseconds
setTimeout(function() {
$("#Img2").addClass("fadeOutRight animated");
}, delay);
});
关于jquery - 在与 animationend 绑定(bind)的函数之前延迟,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19314123/