替換髮生的褪色不...這是我的代碼:爲什麼我的setTimeout函數fadeOut,用jQuery的replaceWith()不工作延遲替換和淡入文本?
$(document).ready(function() {
var delay = 3000; //3 seconds
setTimeout(function(){
$('.header p').fadeOut(300, function(){
$('.header p').replaceWith("<p>A LIFESTYLE FOR EVERYONE</p>");
});
$('.header p').fadeIn(300);
}, delay);
console.log("replaced");
});
@RoryMcCrossan是啊...立即可見部分使得更有意義 – charlietfl
兩個答案同樣好!謝謝! –
太滑稽了...接受複製的答案,在這一個之後清楚地張貼了很久 – charlietfl