![]() |
#1 |
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); |
![]() |
![]() |
![]() |
#2 |
Registered User
Join Date: Oct 2013
Posts: 5
|
To solve this problem you have to call settimeout function in the callback function of jquery of javascript with delay time.
|
![]() |
![]() |
![]() |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Video Trim Script | couponsitescrip | Wanted | 2 | 07-05-2013 12:43 PM |
how to php variable value assign as java script | noahwilson | Programming General | 0 | 05-09-2013 04:55 AM |
The conclusion provided by the Black Hat Java Script | andrebreton2121 | Search Engine Optimization | 6 | 10-17-2012 11:06 PM |
Add mudule in Java Script | alen12345 | Programming General | 0 | 12-27-2011 03:35 AM |
Script to generate my website from folder content | ncjbhd | PHP / mySQL | 0 | 10-17-2011 12:25 AM |