View Single Post
Old 05-30-2013, 10:19 PM   #1
Jack Hard
Registered User
 
Join Date: Dec 2012
Posts: 25
How to delay a setInterval - Java Script

I have an animation in Jquery that I want to repeat with a setInterval every 5 seconds, the problem is that I also want it to wait 5 seconds before starting. I have not find a solution, I thought about something like this but it is not working, it executes immediately:

setTimeout(function(){
bannerInterval = setInterval(function(){
bannerRotate();
},5000);
},5000);
Jack Hard is offline   Reply With Quote