Preloading images in intervals
I'm working on a website with a slideshow (smoothDivScroll) and a lot of big images (about 50 photos of 50k each). This is all together more than 2500k so I want to use preloading of the images. Now I don't need to show all images right from the beginning, so I want to preload in steps: first the first 7 images which are necessary for the first look, than the next 7 when the page had loaded, then the next 7 after lets say 5 seconds etc. The images all have the same heigth of 500 px but different widths.
Basically (without the scrolling scripts) the html is as shown under. Can anybody help me with a script to load these images in intervals?
<!-- the CSS for Smooth Div Scroll -->
<link rel="Stylesheet" type="text/css" href="http://www.deinspiratiekamers.nl/smoothdivnew/css/smoothDivScroll.css"/>
#makeMeScrollable div.scrollableArea img
/* If you don't want the images in the scroller to be selectable, try the following
block of code. It's just a nice feature that prevent the images from
accidentally becoming selected/inverted when the user interacts with the scroller. */
<img src="image1.jpg" height="500px" id="kamer0-1">
<img src="image2.jpg" height="500px" id="kamer0-2">
<img src="image3.jpg" height="500px" id="kamer1-1">
<img src="image4.jpg" height="500px" id="kamer1-1">
<img src="image5.jpg" height="500px" id="kamer3-1">
<img src="image6.jpg" height="500px" id="kamer3-1">
<img src="image7.jpg" height="500px" id="kamer4-1">
<img src="image8.jpg" height="500px" id="kamer4-2">
<img src="image50.jpg" height="500px" id="kamer7-7">
If your slideshow script works on the HTML code you show, then there's not much you can do for preloading. Once the browser sees those <img> tags in the document, it will start to fetch all of the image files from the server.
Yeah that's just my question. Can I do it a different way than the way I have it now in the html code. Or is this a thing that has to be changen in the slideshow script?
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Tags for this Thread