/ Published in: jQuery
Be sure to put the "THIS IS THE CSS" in your style sheet and the "THIS IS THE HTML" into your HTML file.
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
jQuery(function(){ jQuery('.fadein img:gt(0)').hide(); setInterval(function(){ jQuery('.fadein :first-child').fadeOut() .next('img').fadeIn() .end().appendTo('.fadein');}, 3000); }); /* THIS IS THE CSS .fadein { position:relative; width:500px; height:500px; } .fadein img { position:absolute; left:0; top:0; } */ /* THIS IS THE HTML <div class="fadein"> <img src="#"> <img src="#"> <img src="#"> */