I'm trying to change the background image of a page (with setInterval eventually, but this is just a button to test it for now). The background image is appearing fine, and the alternate image is nice.
As it stands, this has the effect of changing the background once, but then it stops. It's as if tail is called once, but not repeated. In fact, I'm pretty sure that's happening because I reversed the image references (i.e. backg1 being set first and then backg being set), which works.
Any thoughts on this?
01-12-2012, 09:47 AM
It seems that I needed to change the interval call to just tail not tail() for some reason.
but really I think you can simplify - put your image paths in an array, set the interval on body load and let the code do the rest, this way you can add as many images as you like to the loop, just by adding their paths to the array: