LINUX.IE, website of the Irish Linux Users' Group
Tux rules!

   
Home
New Users
Articles
Download
Projects
Community
Vendors

  Print Version
Email to...
 
Archives:


planetILUG

Recent News

News Archive


Join the
ILUG
on FaceBook


Join the
ILUG
on LinkedIn


Join the
ILUG SETI
Group



















 
 :: Mailing Lists

[Webdev] hiding images in divs

[Webdev] hiding images in divs

Kae Verens kverens at contactjuggling.org
Wed Jan 29 07:51:16 GMT 2003


Fergal J Byrne wrote:
> At 17:17 28/01/2003 +0000, you wrote:
> 
>> on a site that's being developed, to increase the perceived speed of 
>> searching through the database,
>> we've an image inside a span that we display before starting the 
>> search with:
> 
> 
> function hideContent(id) {
>     var obj = document.getElementById(id);
>     if (obj) {
>       if (obj.style) {
>         whichEl = obj.style
>       } else {
>         whichEl = obj
>       };
>       whichEl.display = 'none';
>     }
> }
> 
> Hide it by calling hideContent('txtShowHide')

I read that IE won't bother loading the image if it's display is set to 
none, so it may be better to simply turn off it's visibility 
("whichEl.visibility='hidden';").

Obviously, the layer should be positioned un-relatively so it doesn't 
screw up the rest of the layers on the screen.

Or better still - simply load the image, and position it off-screen.

-- 
Kae Verens               _______\_   webworks.ie
work: www.webworks.ie       _____\\__   webhosts
play: www.contactjuggling.org  ___\\\___  design
kae:  kverens.contactjuggling.org _\\\\____ code




More information about the Webdev mailing list
Read this without the formatting.
                                                                                                    

 

Hosted by HEAnet


Maintained by the ILUG website team. The aim of Linux.ie is to support and help commercial and private users of Linux in Ireland. You can display ILUG news in your own webpages, read backend information to find out how. Networking services kindly provided by HEAnet, server kindly donated by Dell. Linux is a trademark of Linus Torvalds, used with permission. No penguins were harmed in the production or maintenance of this highly praised website. Looking for the Indian Linux Users' Group? Try here. If you've read all this and aren't a lawyer: you should be!
RSS Version
Powered by Dell