???
This worked...
Code:
///////////////// New button to loop here ////////////
function nextImage() {
p = (p < total - 1) ? p + 1 : p;
showPic(p);
if (playState) {
clearInterval(myInterval);
myInterval = setInterval(slideshow, 4000);
}
}
function prevImage() {
p = (p > 0) ? p - 1 : p;
showPic(p);
if (playState) {
clearInterval(myInterval);
myInterval = setInterval(slideshow, 4000);
}
}
And this disabled the buttons???
Code:
///////////////// New button to loop here ////////////
function nextImage() {
p = (p < total - 1) ? p + 1 : 0;
showPic(p);
if (playState) {
clearInterval(myInterval);
myInterval = setInterval(slideshow, 4000);
}
}
function prevImage() {
p = (p > 0) ? p - 1 : total - 1;
showPic(p);
if (playState) {
clearInterval(myInterval);
myInterval = setInterval(slideshow, 4000);
}
}
I'm missing something...