I am trying to loop the colors, and I am not getting this code correct. It is going to the last color. Not sure what I am doing wrong, I must be missing a line or something.
var forum = $('.main-content .statused tr'),i;
var colors = ["#000","#F00","#FF0","#FFF","#0F0","#00F"];
for(var j=0;j<forum.length;j++) {
forumBG= forum[parseInt(j)];
if(!forumBG) return;
for (i=0;i<colors.length; i++){
forum[j].style.background =colors[i];
}
}
Can anyone help me figure out the loop through different colored backgrounds?