This is probably fairly simple task for someone more experienced with javascript. I'd like to have an array of images and then loop through them to display each one with a certain interval of time between each one.
- Store images in an array: var anArray = [image1, image2, image] (Can I put images into an array by simply put their src in in an array like this? When I tried it treated each like a string.)
- Create a loop to go through each image in the array and fadeIn each image: for (var i = 0; i <= array.length; i++) But I don't want want it to fade in all the images at once, I want one at a time.
- Set an interval of time: setInterval(functioin() {}, 1000); So that each image is displayed 1 second or however many seconds after each other.
I know I could use a plugin, but I'm trying to learn javascript so I want to avoid taking shortcuts(except of course the shortcut of asking for help on here!)
Thanks