I am using jQuery to build an array of images from a php array. I want to loop through these images, preloading them while displaying a little loading gif until all of the i
You are creating a sting and inserting it into the document, where it should become a part of DOM. What you need to do is create a JS Image object, somewhat like this:
// Preload Images:
for(i=0; i<imgCount; i++) {
var image_preload = new Image();
image_preload.src = imgDir+imgArray[i];
}