Martin1
Super User
Netherlands
626 Posts |
Posted - 26 Jan 2008 : 19:30:03
|
Which would be better? The javascript way of pre loading images or the css way. <SCRIPT LANGUAGE="JavaScript"> <!-- hide from none JavaScript Browsers
Image1= new Image(175,50) Image1.src = "image1.gif"
Image2 = new Image(25,30) Image2.src = "image2.gif"
Image3 = new Image(125,80) Image3.src = "image3.gif"
// End Hiding --> </SCRIPT>
or css
<style type="text/css"> .hiddenPic {display:none;} </style> <img src="poodle-puppy-Clara.jpg" alt="Clara at 8 weeks" title="Clara at 8 weeks" height="350" width="350" class="hiddenPic">
<img src="poodle-puppy-Kenny.jpg" alt="Kenny at 10 weeks" title="Kenny at 10 weeks" height="350" width="350" class="hiddenPic">
<img src="poodle-puppy-Aiko.jpg" alt="Aiko at 6 weeks" title="Aiko at 6 weeks" height="350" width="350" class="hiddenPic">
Martin |
|