當jQuery動畫完成時,我必須使用回調函數。我一直做的是這樣的:正確的語法jQuery動畫「完成」回調
.animate({ properties }, duration, function() { /* callback */ });
然而,這裏提出一個問題時,我已經提出了不同的語法的解決方案。
$('#redirectNoticeContainer').animate({ properties }, { queue: false, duration: 123 });
我應該在哪裏放回調函數?這是我的猜測,但它不起作用。
$('#redirectNoticeContainer').animate({ properties }, { queue: false, duration: 123 }, function() {
console.log("ok");
setTimeout(function() { window.location.replace("/Account/Login"); }, 1200);
});
該動畫的作品。回叫不。我應該把它放在哪裏?
http://api.jquery.com/動畫/ –