View Full Version : Loading Images?
Tom Bottiglieri
16-02-2004, 17:50
in HTML, is there any way to load images that aren't displayed on the screen when the page is loaded. I want to have some roll over images on the site, and sometimes it lags when you rollover the first time, due to the computer having to download the image.
<div style="display:none;">
(images go here)
</div>
Tom Bottiglieri
16-02-2004, 18:19
ok im not completely understanding that.
so thats how you would load them? but then how would you refrence that in a later portion of the site?
Joe Ross
16-02-2004, 18:26
He's using some CSS which would download the images, but not display them. In the section where it says, images go here, you would put <img> tags for each of the images. The browser would download them as part of loading the page, and when you go to rollover the images, they would already be downloaded, and display instantly. This solution wouldn't require any changes to your rollover script.
If you want to do it completely in javascript, have a look at some of the scripts over at hotscripts.com: http://www.hotscripts.com/JavaScript/Scripts_and_Programs/Image_Effects/Changing_Images/index.html
vBulletin® v3.6.4, Copyright ©2000-2017, Jelsoft Enterprises Ltd.