I tried implementing it.But..the image changes from the first to the secnd and then stops.
for your reference,please find the code i tried to implemented.
<div id="images"> <img name="slide" src="img/banner1.png"/>
<script type="text/javascript" >
var slideShow=document.getElementById("images");
var allImages= new Array();
allImages=["img/banner3.png","img/banner2.png","img/banner4.png","img/banner5.png"];
var imageIndex=0;
function changeImage()
{
document.images.slide.src=allImages[imageIndex];
//slideShow.setAtrribute("src",allImages[imageIndex]);
console.log("executing 1");
imageIndex++;
if(imageIndex >= allImages.length)
{
console.log("executing 2");
imageIndex=0;
}
}console.log("executing 3");
setTimeout("changeImage()",1000);
console.log("executing 4");
</script>
</div>
Can Someone,help me in fixing this issue..Please!