1
本質上我希望文本淡入,延遲3秒然後淡出。以下代碼立即淡出,然後不會淡入3秒。幫助jQuery顯示並延遲
$('#temp').fadeIn('slow', function() {
$('#temp').html(response);
}).fadeOut('slow').delay('3000');
本質上我希望文本淡入,延遲3秒然後淡出。以下代碼立即淡出,然後不會淡入3秒。幫助jQuery顯示並延遲
$('#temp').fadeIn('slow', function() {
$('#temp').html(response);
}).fadeOut('slow').delay('3000');
你只需把它們連在了正確的順序:
$('#temp').fadeIn('slow', function() {
$('#temp').html(response);
}).delay(3000).fadeOut('slow');
`'3000'`?讓我們對其進行分解。這看起來幾乎和PHP開發人員使用`「$ var」`而不是`$ var`一樣糟糕;) – ThiefMaster 2010-12-01 23:24:30