hello
I am wanting to fade out a series of images from my web page and I have written a few lines of code to complete the task.
I have, say, three images 1.jpg, 2.jpg and 3.jpg. I create a for loop to write to a div container each of the jpg's. I cannot get the functions to work properly. The images do fade but they do not update, they all stay at 3.jpg.
Can anyone explain what I am doing wrong, pleasE?
The code
function DoImage(pageId){
var imageContent
function DoImageShow(index){
imageContent = '<img src="images/' + index + '.jpg"></img>'
$("#image").html(imageContent).fadeIn(400).delay(400).slideUp()
}//end DoImageShow
for (var index = 1;index < (Number(numberOfImages) + 1);index++){
DoImageShow(index)
}//end for
}//end DoImage