I can't get the following code to work. Can somebody please take al look? thx!
I want to change the content of a div with an interval. But I can't get the code below to work. I know I am close and need a for loop or something that updates the imgArr[i], but I just can't figure it out.
code:
$(document).ready(function(){
var imgArr = new Array(
'Welkom bij MD Fantasy',
'Nagelstudio',
'Haarstudio'
);
var intID = setInterval(changeTekst, 15000);
function changeTekst(){
$('#mainTekst h1').animate({opacity: 0}, 1000, function(){
$(this).html( imgArr[i] );
}).animate({opacity: 1}, 1000);
};
});