I have an array which contain some text descriptions. I want to display one element at a time with time delay (10 sec). After show all elements, it should be start again.
var d = 0;
var dataList = ["a","b","c"];//eg:
function ShowList()
{
do{
var descrip = dataList[d];
document.getElementById('section1').innerHTML = descrip;
d++;
setTimeout(ShowList(),10000);
}while(d < dataList.length);
}
ShowList();
I'll try with above code, but not working properly.