0
for (i = 0, j = menuButtonArray.length; i < j; i += 1){
$(menuButtonArray[i]).find("img").attr('src', 'menuImages/'+heavanArray[i]) 
console.log("LOOP = "+i);
}

I am swaping out 9 images. Why doesn't the loop update the array element selector each time. It only works on first loop [0] but will not update, while console log does update.

0 Answers0