I am using image maps to hover some images in a slider, works well but there is a flicker until it loads once, then it works well. Anyone knows why is this happening?
BY the way, it happens only in FIREFOX
<script>
Image1 = new Image()
Image1.src = "images/slide1aroll.jpg"
function firstmap() {
document.emp.src = Image1.src;
return true;
}
</script>
<li style="width: 480px; height: 610px;"><img src="images/slide1a.jpg" name="emp" id="emp" class="emp" width="480" height="610" usemap="#model1" style="display:block; border:none;" border="0" /></li>
<map name="model1" id="model1" name="model1">
<area shape="rect" coords="31,6,289,576" href="#" onmouseover="firstmap();" onmouseout="document.emp.src = 'images/slide1a.jpg';" alt=""/>
<area shape="rect" coords="303,9,475,605" href="#" onmouseover="firstmap2();" onmouseout="document.emp.src = 'images/slide1a.jpg';" />
</map>
Do caching of the image
With this you have all your image present at the first go. It will not flicker now. Try it