我正在尋找一種方式來.preventDefault()做一個過渡,然後允許默認行爲是否可以顛倒e.preventDefault()?
$('.withTrans').click(function(e){
e.preventDeault();
$(this).animate('opacity','0',300,function(){
e.resumeDefault(); // does something like this exist?
});
})
看到這個:http://stackoverflow.com/questions/1238477/suspend-default-event-in-jquery – 2012-03-04 15:29:52
沒有內置的功能。當動畫結束時,事件處理也可能已經完成。 – 2012-03-04 15:31:18