點擊一個按鈕後事件的下一個腳本我希望最後2個jQuery事件在動畫完成之後開始。完成前一個事件後開始一個事件
我該怎麼做?
<script>
$(document).ready(function() {
$("button").click(function(){
$("img:first").removeClass("bounceIn").addClass("animated lightSpeedOutleft")
$("img:last").removeClass("bounceIn").addClass("animated lightSpeedOut");
$("button:first").removeClass("bounceIn").addClass("animated flipOutX");
$('div:first-child').addClass("display");
$('div:last-child').removeClass("display").addClass("animated fadeInUp");
});
});
</script>
'delay()'意味着與'fx'隊列一起使用。由於沒有jQuery動畫實際發生在這裏,所以恐怕沒有關係。 – Boaz