Код: Выделить всё
var i = 0; var path = new Array();
// LIST OF IMAGES
path[0] = "image_1.png";
path[1] = "image_2.png";
path[2] = "image_3.png";
function swapImage() { document.slide.src = path[i];
if(i < path.length - 1) i++;
else i = 0; setTimeout("swapImage()",2000);
} window.onload=swapImage;
[img]image_1.gif[/img]
Подробнее здесь: https://stackoverflow.com/questions/360 ... y-carousel
Мобильная версия