I need help creating a dynamic rotating DIV that changes automatically. I've implemented a switchRotator(id) function using JQuery to update the content of the DIV. However, I'm encountering an error with this function:
function launchTimedRotator(){
//timedSwitch is a boolean variable that can be toggled with buttons
if (timedSwitch) {
if (counter<2) {
counter++;
} else {
counter = 1;
}
switchRotator(counter);
setInterval("launchTimedRotator()",3000);
return null;
}
};
I'm attempting to achieve recursion by having the function call itself at the end. But I'm running into an issue where Google Chrome's Developer Tools shows: Uncaught ReferenceError: launchTimedRotator is not defined
Your assistance would be greatly appreciated.