3 秒間隔でいくつかのリンク画像を表示しようとしていますが、最初の画像がフェードアウトした後は何も表示されません。
<div class="fadein">
<a href=""><img src="/media/home-content.jpg" alt="" /></a>
<a href=""><img src="/media/Banners/images/denim.jpg" alt="" /></a>
</div>
jquery
jQuery.noConflict();
jQuery(document).ready(function(){
jQuery(function(){
jQuery('.fadein a img:gt(0)').hide();
setInterval(function(){
jQuery('.fadein a:first-child img').fadeOut(3000)
.parent().next('a img').fadeIn()
.end().appendTo('.fadein');},
3000);
});
});
アップデート
コードを次のように変更するだけです
jQuery(function(){
jQuery('.fadein a:gt(0) img').hide();
setInterval(function(){
jQuery('.fadein a:first-child img').fadeOut(3000)
.parent().next('a').children('img').fadeIn()
.end().appendTo('.fadein');},
10000);
});