Forum Moderators: open
I'm making my first website at the moment and just made it live which was exciting ! :O
My only problem is that the rollover images aren't preloading, you have to hold the mouse over the image for a second or two before it pops up.
Here is the code from dreamweaver for one of the images:
<a href="tickets.html" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Image8','','../Images/t1.jpg',1)"><img src="../Images/t.jpg" name="Image8" width="51" height="29" border="0" id="Image8" />
Any help greatly appreciated.
Thanks
however i never used it...
Do I just copy and past the text into dreamweaver code and replace jpg extensions?
Paste it into the very bottom of your source code - right before the </body> tag.
All that really matters is preloading the .jpg, .gif or .png file into the browser cache. I suggest you avoid using the same names in your preload script as your Dreamweaver code uses in the mouseover script. Just pick some name that will keep you from tangling up the variables. You could name the variable "Fred01" if you wanted to.
<script langluage="JavaScript">
Fred01= new Image
Fred01.src = "example.jpg"
Fred02= new Image
Fred02.src = "example2.gif"
Fred03= new Image
Fred03.src = "example2.png"
</script>