04-06-2005, 08:53 AM | #1 (permalink) |
Insane
Location: not there
|
mouseover help
I am using a really basic mouseover script to change a linkable image when the mouse runs over it. The script works fine on my local computer but after I upload the page to my host it takes ages for the image to swap to the second image. I have tried using a Javascript but get the same results.
Here is the code that I am using now. I thought it would be best as it was the most basic; <a href="page1.htm"><img src="graphics/image1.jpg" border="0" onmouseover="src='graphics/image2.jpg'" onmouseout="src='graphics/image1.jpg'"></a> Is this just a problem with my host or my connection or is there a faster way to do this. Thanks. |
04-06-2005, 02:08 PM | #3 (permalink) |
paranoid
Location: The Netherlands
|
Try loading the image in javascript, on document load.
put something like this in the head section of your document: <script type="text/javascript"> preloadImg = new Image() preloadImg.src = "yourimage.png" </script>
__________________
"Do not kill. Do not rape. Do not steal. These are principles which every man of every faith can embrace. " - Murphy MacManus (Boondock Saints) |
Tags |
mouseover |
|
|