After creating an image gallery that functions perfectly in Chrome, I noticed it fails to work in Firefox or Internet Explorer. While scouring similar questions for solutions, none seem to address the issue at hand.
To showcase the problematic code, I've created a JFiddle:
https://jsfiddle.net/ydmgjzwp/
The culprit behind the malfunction seems to be:
function updateMainImage(){
var selected = imageController.selectedImageObject;
var currentImageObject = imageController.imageObjects[selected];
var newImage = currentImageObject.image;
$(imageController.mainImageImg).attr("src", newImage);
}
In Internet Explorer and Firefox, the main image fails to load entirely. The expected behavior is for jQuery to switch it to the first of the smaller images, then transition to whatever the user selects.
Error messages in the console logs haven't provided much insight thus far, though there could be something crucial that I'm overlooking. Any assistance would be greatly appreciated.