1

I want to create a slideshow which contains some 30-40 images. I want to load all these images before showing the slide show, how it can be done? I will play my slideshow only after all images are loaded.

coure2011
  • 40,286
  • 83
  • 216
  • 349

2 Answers2

0

You can use a jQuery image preloader.

There are some plug-ins already out there: http://farinspace.com/jquery-image-preload-plugin/

But you may want to roll your own: http://engineeredweb.com/blog/09/12/preloading-images-jquery-and-javascript

attack
  • 1,523
  • 12
  • 17
0

[From the previous experience of mine]

I think its not a good Idea to preload or load all 30-40 images at once. Because It makes the web server very busy to handle the request. What about the people having very slow Internet Connection ? more over when you want your slideshow begin only after all images are loaded, the user may or may not stay on your page until all your the images are loaded. I suggest you do some thing like,

lets assume that your Slide show consists of 40 Images,
Preload the first 10 Images  and let the slide show begin,
when the slide show is in process,
send a Asynch request or what ever and download the remaining content. 

I guess this is an efficient way than loading all Images at once