[Javascript] Calling images only when needed.
Peter-Paul Koch
pp.koch at gmail.com
Mon Feb 14 15:29:25 CST 2005
> >Suppose that I wind up with 600 plus images I want to show off.
> >Is there a way to keep the thumbnails from downloading and causing a long
> >wait before the menu falls back to the collapsed state?
> >I don't see why I have to code in every cotton pickin image and force the
> >visitor to accept the 600 thumbnails.
>
> Richard,
>
> If you use CSS to apply {display: none;} to an image (or an image's
> container) it will not download until you change this to {display: block;}
> or {display: inline;}.
Unfortunately that is true only in Opera and Safari. Explorer (Win and
Mac) and Mozilla immediately download the images.
--
-------------------------------------------------------------------
ppk, freelance web developer
Recent article: JavaScript triggers,
http://www.alistapart.com/articles/scripttriggers/
Bug Report: Report bugs yourself, or comment on previously
reported ones.
http://www.quirksmode.org/bugreports/
------------------------------------------------------------------
More information about the Javascript
mailing list