I am trying to roll through my banner images using a while loop in jQuery.
I need to find a way to pause each cycle of the loop so the banner images can cycle round slowly.
Here is my code
var bannerIMG = ['img1','img2','img3'];
var counter = 0;
var num = 1;
while (num <= 3) {
$('#header').addClass(bannerIMG[counter]);
counter = counter +1;
num = num+1;
}
Thanks in advance
setIntervalorsetTimeoutwould be more appropriate