I have an <img> that I want to have alternate between 4 pictures using javascript. How can I go about doing this in a way that will still allow me to click on other parts of the page while the images are changing. Do I need a thread of some sort?
Asked
Active
Viewed 47 times
1
Passerby
- 9,514
- 2
- 30
- 47
user1154644
- 4,137
- 15
- 57
- 95
-
3javascript does not have threads(except for webworker - html5). You need to look at [setTimeout](https://developer.mozilla.org/en-US/docs/Web/API/window.setTimeout) / [setInterval](https://developer.mozilla.org/en-US/docs/Web/API/window.setInterval) – Arun P Johny Jun 26 '13 at 02:55
-
something like this: http://www.slidesjs.com/? – stackErr Jun 26 '13 at 02:57