I have a javascript object like so:
var object = [{ id: 1, title:"xyz" }, {id: 2, title: "abc"}, {id: 3, title: "sdfs"}];
Now what I want to do is go through the object such that it would read the first id and output “xyz”, then pause for 5 seconds, then go through the second id and output “abc”, pause for 5 seconds again then go through the third entry output “sdfs”, pause for 5 seconds yet again and start all over from entry 1. I want this to go on indefinitely. Any help would be appreciated.
Your basic recursive function:
Or, to loop infinitely:
http://jsfiddle.net/Mezxw/