The forum of the forums
Welcome to the Official Support Forum of Forumotion!

To take full advantage of everything offered by our forum, please log in if you are already a member, or join our community if you've not yet.



Create a free forum like this one.

How to preload images for mouse rollover in the navbar?

View previous topic View next topic Go down

In progress How to preload images for mouse rollover in the navbar?

Post by Soulmonster on June 8th 2011, 2:30 pm

Hi,

I have a navbar consisting of images. I have added a nice rollover effect so the pictures change whenever someone hovers the mouse over the pictures. BUT, it lags. Is it possible to preload the hover images so that this lag disappears?

Soulmonster
Forumember

Posts : 203
Reputation : 2
Language : Norwegian

Back to top Go down

In progress Re: How to preload images for mouse rollover in the navbar?

Post by Sanket on June 8th 2011, 2:34 pm

A technique used for just what you do. You can try to implement it. I am not sure how you added a rollover for a navbar.
http://www.webartzforum.com/t420-rollover-button-using-css

Sanket
ForumGuru

Male Posts : 48766
Reputation : 2819
Language : English
Location : Mumbai

http://webartzforum.com

Back to top Go down

In progress Re: How to preload images for mouse rollover in the navbar?

Post by Mr_Waffle on June 8th 2011, 4:06 pm

Maybe try loading the pictures in a hidden div like so:
Code:
<div style="height:1px;width:1px;visibility:hidden;">
<img src=""> //multiple times
</div>
Or try loading the pictures somewhere on the page but with 0 height and width, like so:
Code:
<img src="" style="height:0;width:0;">
I have no idea if either of these codes actually load the picture in the background, but you can try it. If it doesn't work, you can also try to put image heigth and width to 1 in the second example.

Mr_Waffle
New Member

Posts : 24
Reputation : 0
Language : Dutch | HTML | CSS | JavaScript | jQuery | Java | MIPS ASM | Learning C#

Back to top Go down

View previous topic View next topic Back to top


 
Permissions in this forum:
You cannot reply to topics in this forum