View Full Version : image preloader problem

06-02-2012, 12:46 PM
I just realized that the image preloader method I've been using doesn't work for Chrome. How can I get this to work with Chrome-


margin: 0 auto;
position: absolute;
visibility: hidden;


<div id="imagepreloader">
<img src="test1.png" style="width: 1px; height: 1px;">
<img src="test2.png" style="width: 1px; height: 1px;">
<img src="test3.png" style="width: 1px; height: 1px;">

06-02-2012, 01:15 PM
For instance, I have image2 which replaces image1 when hovered. Without adding the preloader, if I hover over image1, then there will be a delay until image2 is loaded and displayed. The code above will prevent this delay, at least for IE and Firefox. But in Chrome, I still get the delay. I want there to be no delay between switching images, or before displaying divs which had previously been display:none.