Endless scrolling photo slideshow in Javascript

EDITED 8-10-15: Click here for an updated version of the Endless scrolling photo slideshow in Javascript


var total = 11;/* Total number of slides */
var currentSlide = 1;
function goto(slideID) {
if (slideID==total+2){/*If we are at the end of the slideshow tape, instantly rewind to the beginning of the tape*/
document.getElementById("slideshowTape_1").className = "slideshowTape speedZero/*set up the transition speed via a css class*/";
document.getElementById("slideshowTape_1").style.left = "0px";
currentSlide = 2;
setTimeout("goto(2)", 5);
}
else{
document.getElementById("slideshowTape_1").className = "slideshowTape speedSix/*set up the transition speed via a css class*/";
document.getElementById("slideshowTape_1").style.left = ((slideID - 1) * -400/*width of one slide*/) + "px";
var count;
for(count=1; count<=total; count++) {
document.getElementById("slideTab"+count).className = "slideTab hidden";
}
document.getElementById("slideTab"+slideID).className = "slideTab";
currentSlide = slideID;
}
}
function ran() {
randomNumber=currentSlide+1;
goto(randomNumber);
setTimeout("ran()", 6000/*change slides every 6 seconds*/);
}
setTimeout("ran()", 5);
// ]]></script>





RECENT POSTS