I developed the below image changer with JQuery:
var images = [];
images[0] = "image1.jpg";
images[1] = "image2.jpg";
var i = 0;
setInterval(fadeDivs, 3000);
function fadeDivs() {
i = i < images.length ? i : 0;
$('.slideshow-right-corner img').fadeOut(100, function(){
$(this).attr('src', images[i]).fadeIn(100);
})
i++;
}
For some reason, it works fine locally, however when I integrate with my website, it works fine for the first image in the array and stops working. The following is the error I receive when I inspect the element:
Uncaught TypeError: undefined is not a function (index):398 (anonymous function) (index):398 E.complete jquery-1.3.2.min.js?ver=3.4.1:19 o.fx.step jquery-1.3.2.min.js?ver=3.4.1:19 F jquery-1.3.2.min.js?ver=3.4.1:19 (anonymous function)