Go Back   Site Owners Forums - Webmaster Forums > Web Programming > Programming General > Javascript

Notices


Reply
 
Thread Tools Rate Thread Display Modes
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

Old 10-23-2013, 05:40 AM   #2
kashifalijugnoo
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.
kashifalijugnoo is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Similar Threads
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


All times are GMT -7. The time now is 12:27 PM.


Powered by vBulletin Copyright © 2020 vBulletin Solutions, Inc.