2

I'm using Prototype/Scriptaculous library for a featured content slider, it works great but the images need to be preloaded.

I've used jQuery mostly so I'm not sure how its done with Prototype. Here's the slider script if you'd like to take a look.

Rob W
  • 341,306
  • 83
  • 791
  • 678
eozzy
  • 66,048
  • 104
  • 272
  • 428

1 Answers1

5

You can do this with a few simple lines of Javascript

var preload = []
for(var x=0;x<slider_images.length;x++) {
     preload[x] = new Image()
     preload[x].src = slider_images[x]
}
Diodeus - James MacFarlane
  • 112,730
  • 33
  • 157
  • 176