views:

50

answers:

2

Hi,

i have a page with the main content area being big thumbnails, but elsewhere on the page are about 100-200 other (smaller) thumbs that are not important but must still show.

What ways do i have to make the main ones show first (or the unimportant ones show last)?

I was thinking of these ways:

JS load: on page load (once it has finished loading), use a jquery's append() (or whatever other way) to write the html with the image code

Set all unimportant images inside a div with style="display:none;". Then once the page has loaded, use JS to set it as visible

what do you think is the best way?

A: 

You might want to check out the YUI ImageLoader. It basically loads images only if/when they are needed (i.e. scrolled into view).

Felix
@Felix That is not what he asked for
c0mrade
no idea why you have a down vote. this seems perfect.it looks like it can be modified so scrolling is required.thanks ( i would vote up but i think i have to validate my email or something to do that)
imlostmike
@c0mrade No, but maybe it's what he wants.
Felix
+1  A: 

I would set the 'src' of all images to be a transparent 1 pixel gif and then use JS to loop through the images, 'in order of importance', and set the 'src' attribute on page load.

pb
@pb this is a good point
c0mrade
i second pb. you can use an array list in the order you wish to load.
ZX12R