我有一个问题,我有这样的代码:如何使事件等待,直到jQuery的翻页效果结束?
$(document).ready(function(){
/* The following code is executed once the DOM is loaded */
$('.clsks').mouseenter(function() {
var ob = $(this);
var dar = $(this).attr('ids');
var obj1 = $('#sponsorFlip'+dar);
var obj2 = $('#sponsorData'+dar);
obj1.flip({
direction:'lr',
speed: 350,
onBefore: function(){
// Insert the contents of the .sponsorData div (hidden from view with display:none)
// into the clicked .sponsorFlip div before the flipping animation starts:
obj1.html(obj2.html());
}
});
// Setting the flag:
//obj1.data('flipped',true);
}).mouseleave(function() { var dar = $(this).attr('ids');
var obj1 = $('#sponsorFlip'+dar); obj1.revertFlip(); });
});
我需要做的事件MouseEnter等到这个jQuery的翻转完成的Cuz有时候如果有人的mouseenter快速的鼠标离开失败的Cuz“obj1.html(obj2.html( ));”超过它。
但我只需要做出MouseEnter事件等待jQuery的翻转完成。
您无法在mouseenter上启动翻转,但需要等待翻转完成。这没有任何意义。当你得到mouseenter事件时,它已经发生了。翻转完成后你想做什么操作?或者,你试图解决的真正问题是什么。 – jfriend00 2012-01-07 03:29:15