views:

48

answers:

1
+1  Q: 

Image preloading

I'm trying to preload my images but it's not working. in my main stylesheet I created #preload and then in my html I created a preload div. In the css I did the background method to try to preload them but it doesn't work.

+1  A: 

You can accomplish this with Javascript

<SCRIPT language="JavaScript">
<!--
if (document.images)
{
  pic1= new Image(100,25); 
  pic1.src="http://someplace.com/image1.gif"; 
}
//-->
</SCRIPT>
Kosta