Possible Duplicate:
Do something every 5 seconds and the code to stop it. (JQuery)
I have a gallery that i want to automatically run without me using it.
How can i run a script that calls this every 5 seconds or so on this http://www.meadmiracle.com/SlidingGalleryDemo1.htm
I need this to be called every 5 seconds or so bsaically so the gallery looks like it automatically scrolls.
$.galleryUtility.slideLeft( )
You need to use the
setIntervalmethodUpdate
In your specific case, you should add it right after you initialize the gallery.
Update 2
To start stop the autoslide you will need to clear the interval, and to do so you need a reference to the returned value from the
setIntervalcall.now when you want to star the auto-slide you call
start_autoslide();and when you need to stop it you callstop_autoslide();