Well, it’s a bit hard to explain what I need to do, but:
I have an array of 21 strings, and I have a javascript function that works every 3 seconds which looks like this:
function Ready(){
t=setTimeout("change()",3000);
}
$(document).ready(function() {
Ready();
});
What I don’t know how to do is: how would I change a div element (called “id1”) every 3 seconds, replacing its text with a new text from the array, from 1 to 21 and then back to 1 again?
This uses something called an “anonymous function”, that takes the place of “change()” in your question. This is the proper way to use setTimeout.