How can I delay loading images which are 'hidden' until DIV is scrolled

G

Gary Hasler

I did an image gallery which displays groups of picture thumbnails in a
series of horizontally scrollable DIVs. It works great, and the boss
absolutely loves it, but I never really realized how many hundreds of
pictures would pile up in some of them, which causes a long page load
time, even with a high speed connection. Example:
http://www.thelogconnection.com/inprogress_project.php?Richardson

Does anyone have any suggestions for this? For instance, I could delay
loading the thumbnails which are not initially visible, then they could
begin loading when the user starts scrolling the div to the right. It
can work in server side PHP or client side JS or both, for instance the
server script could write html for 'blank' images after about the sixth
image or so in each strip, then have some kind of JS "onScroll" event
handler change the thumbnail SRCs to the real images? This sounds a bit
complicated...better ideas?
 

Members online

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top