Posted By

themolitor on 06/17/10


Tagged


Versions (?)

Who likes this?

4 people have marked this snippet as a favorite

vedgiee
Hollow
x0nine
Teddyftl


jQuery Slideshow


 / 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.

  1. jQuery(function(){
  2. jQuery('.fadein img:gt(0)').hide();
  3. setInterval(function(){
  4. jQuery('.fadein :first-child').fadeOut()
  5. .next('img').fadeIn()
  6. .end().appendTo('.fadein');},
  7. 3000);
  8. });
  9.  
  10. /* THIS IS THE CSS
  11. .fadein { position:relative; width:500px; height:500px; }
  12. .fadein img { position:absolute; left:0; top:0; }
  13. */
  14.  
  15. /* THIS IS THE HTML
  16. <div class="fadein">
  17.   <img src="#">
  18.   <img src="#">
  19.   <img src="#">
  20. */

Report this snippet  

You need to login to post a comment.