Rotating Divs using jQuery
问题 Simple easy one. I am trying to rotate image inside divs and cycle back to the first one when the end of my array has been reached. Can someone please help point me out where I am going wrong in my code here? It seems that when it gets to the second image, the index never returns back to zero to start with the first image in my array again. var images = new Array ('.advert1', '.advert2'); var index = 0; function rotateImage() { $(images[index]).fadeOut('fast', function() { index++; $(images