I’m trying to get a function to repeat itself once it starts, but I must be off today because I can’t figure it out. Here’s my code:
function runNext() {
galleryNext().delay(1500).runNext();
}
Thanks in advance.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
If you want to call a function on a regular interval you should use
setInterval().If you ever need to stop the function from being called forever, setInterval() returns an id that you can use to stop the timer as well. Here’s an example.