請幫助我,並告訴我這裏有什麼問題.... 也我不想使用jq插件 當我setInterval代碼圖片來與不同方式 對不起我的英文不好幻燈片與淡入和淡出(jquery)
<code>
$(function(){
function slideshow(){
$('.img4').fadeOut(2800,null,function(){
$('.img3').fadeOut(2800,null,function(){
$('.img2').fadeOut(2800,null,function(){
$('.img1').fadeIn(2800,null,function(){
$('.img2').fadeIn(2800,null,function(){
$('.img3').fadeIn(2800,null,function(){
$('.img4').fadeIn(2800,null,function(){
$('.img4').fadeOut(2800)
})
})
})
})
})
})
})
}
//slideshow()
setInterval(slideshow,1000);
</code>
的症狀有哪些?這是一些非常難以維護的代碼就在那裏。 –
***飛行V *** – rlemon
您應該循環播放圖像,而不是使用每個圖像的回調函數。 – 2012-05-31 12:27:25