views:

29

answers:

1

I built a basic slideshow from scratch in jQuery.

The way it works is php hands an array of image paths to jQuery via JSON once upon page load, and jQuery just inserts a new img into the page using the src info from the array.

When you click next, a new image is inserted and the previous one is removed from the DOM once it slides away.

For some reason, Firefox insists on making a new GET request for the next image everytime the slideshow is invoked, regardless of the fact that it's already downloaded the images.

Safari and Chrome don't seem to do this.

I thought the problem might have to do with removing the images from the page once they moved offscreen, so I have jQuery dump all the images into a hidden div on page load, so every image is always in the DOM.

Unfortunately this seems to have no effect.

Any ideas?