I've got a page that reads a list of images from a directory and randomly picks one to display in a particular section. Every 5 seconds, it randomly picks a different image to display.
I'm using setTimeout to accomplish this. The problem I've got now, is that whenever it fires on the 5 second mark, it messes up what I may have been doing on the page. For example, if I had a drop-down box clicked and was looking for the entry I wanted, when the 5 seconds fires, it closes the drop-down almost as a refresh.
Is there any way around this?
I'm using setTimeout to accomplish this. The problem I've got now, is that whenever it fires on the 5 second mark, it messes up what I may have been doing on the page. For example, if I had a drop-down box clicked and was looking for the entry I wanted, when the 5 seconds fires, it closes the drop-down almost as a refresh.
Is there any way around this?