It appears you have not yet registered with DEVPPL. To register please click here... (it's fast, easy and free!)

Forum

Log In Sponsors
Board index Programming HTML Forum

Preloaded images ?

Preloaded images ?

Postby Tomi on Tue Sep 12, 2006 5:06 pm

someone said somthing about preloaded images when i showed my website in the showroom, im makin a new website and i am guna make some links change pic when peeps hover over them... so how i make preloaded images ?

Thanks
Tomi
User avatar
Tomi
500+ Club
 
Posts: 925
Joined: Mon Jun 26, 2006 6:51 pm
Location: Essex, England

Postby webmaster on Tue Sep 12, 2006 8:38 pm

One simple way is to add the hover-images like this in the code.

Code: Select all
<img src="hover.gif" width="0" height="0" alt="" />


There are many ways to do this with javascripts and such things, but this is the most simple one, I haven't tested it, but it should work.
Make sure to check out our TNX Review and Link Vault Review
User avatar
webmaster
Site Admin
 
Posts: 2695
Joined: Tue Aug 17, 2004 1:07 pm
Location: Sweden

Postby Tomi on Tue Sep 12, 2006 9:19 pm

isnt that just an image code with an image called hover lol ? can use overscr="myimage.gif" but the image takes time to load when the mouse hovers over....
User avatar
Tomi
500+ Club
 
Posts: 925
Joined: Mon Jun 26, 2006 6:51 pm
Location: Essex, England

Postby mwa103 on Wed Sep 13, 2006 9:50 pm

One simple way is to add the hover-images like this in the code.

Code:
<img src="hover.gif" width="0" height="0" alt="" />


What webmaster is saying is add this code somewhere else in your page replacing "hover.gif" with your hover images. Setting the width & height to 0 means the image won't be displayed, but the browser will still load the image from the webserver before it is needed by the hover. This means a copy of the image will already be on the users machine before it is needed which will remove the hover delay.

-Mike
mwa103
100+ Club
 
Posts: 206
Joined: Mon Mar 07, 2005 10:55 pm

Postby Tomi on Wed Sep 13, 2006 10:01 pm

ah im sorry i webmaster i understand now ;) thanks for explaining it mwa and thanks for tellin in first place webmaster :D
User avatar
Tomi
500+ Club
 
Posts: 925
Joined: Mon Jun 26, 2006 6:51 pm
Location: Essex, England


Who is online

Users browsing this forum: No registered users and 3 guests