Posted By

marzsman on 04/11/11


Tagged

jquery images fadeInfadeOut


Versions (?)

Who likes this?

1 person have marked this snippet as a favorite

maltem


FadeCycle Images


 / Published in: jQuery
 

FadeIn and FadeOut cycle through some images in a div

  1. $('.imageWrapper div:not(:first)').hide();
  2. var length = $('.stores .imageWrapper div').length;
  3. animateLogo();
  4.  
  5. function animateLogo() {
  6. index = (index >= length)? 1 : index+1;
  7. $('.imageWrapper div:nth-child('+index+')').delay(2000).fadeIn(1000,animateLogo).delay(2000).fadeOut(1000);
  8. }

Report this snippet  

You need to login to post a comment.