|
Posted by Barbara de Zoete on 10/28/83 11:41
On Fri, 03 Mar 2006 12:09:42 +0100, <alexjaquet@gmail.com> wrote:
> I'm trying to preload image for a better user experience but it doesn't
> work
>
> I find a simple script to load image
> any help would be appreciate thx
I wouldn't know about the script, but I have an other way to do that:
Put your images in a div right at the beginning of the body of your page,
like so:
..------[ Code snippet ]
| <body>
| <div id="preload">
| <img src="img_0001.jpg">
| <img src="img_0002.jpg">
| <img src="img_0003.jpg">
| <div>
`------
Hide this div using CSS, like so:
..-----[ styles ]
| div#preload {
| position:absolute;
| top:-1200px;
| left:-1200px;
| }
`-----
Now the images get loaded but remain invisible in a graphical browser.
Since they are present in the cache of the browser of your visitor, you
can use them to create hover effects and so on.
--
______PretLetters:
| weblog | http://www.pretletters.net/weblog/weblog.html |
| webontwerp | http://www.pretletters.net/html/webontwerp.html |
|zweefvliegen | http://www.pretletters.net/html/vliegen.html |
Navigation:
[Reply to this message]
|