Code snippet:
<script type="text/javascript>
function displayNextImage() {
x = (x === images.length - 1) ? 0 : x + 1;
document.getElementById("img").src = images[x];
}
function displayPreviousImage() {
x = (x <= 0) ? images.length - 1 : x - 1;
document.getElementById("img").src = images[x];
}
function startTimer() {
setInterval(displayNextImage, 10000);
}
var images = [], x = -1;
images[0] = "image0.jpg";
images[1] = "image1.jpg";
images[2] = "image2.jpg";
images[3] = "image3.jpg";
</script>
Every 10 seconds the image changes and resets to the first one. I need a caption below each image with related information. This should be done using Javascript or jQuery if necessary.
Adding text directly on the image in Photoshop is an option, but concerns about how it will look have been raised.