jQuery Slideshow


/ Published in: jQuery
Save to your folder(s)

Be sure to put the "THIS IS THE CSS" in your style sheet and the "THIS IS THE HTML" into your HTML file.


Copy this code and paste it in your HTML
  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


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.