This is a discussion on "preload isn't working" within the JavaScript Forum section. This forum, and the thread "preload isn't working are both part of the Program Your Website category.
|
|
|
|
|
![]() |
||
preload isn't working
|
||
| Notices |
![]() |
|
|
LinkBack | Thread Tools |
|
|||
|
preload isn't working
Hi there,
I'm making a menu with rollover tabs. They roll over properly, but the preload isn't working, and even after waiting for the hover image to show, it forgets it if I hover away and back on top of the tab. I can't see what's wrong. code:
also, i should note this html file (simplified) is called from an aspx page in case that's important. I don't know anything about aspx files tho. thanks |
|
|
|
||||
|
Re: preload isn't working
The background switch CSS method is much better than using JavaScript to preload images. Create a single image with both the off state stacked on top of the on state. Then use something like this in your CSS:
|
|
|||
|
Re: preload isn't working
aw isn't there some way to make the preload work? i've got like 50 images total over a bunch of sites and I'd rather not get into editing them all
|
|
|||
|
Re: preload isn't working
do you think it's caused by me using (in the CSS part) the file's URL instead of the js image_url[1]? i don't know how to put image_url[1] into background-image, if it's even possible. If not, I'll just give up on it as the boss wouldn't want me spending much MORE time on the stupid menus.
|
|
||||
|
Re: preload isn't working
There is no JavaScript involved when using the CSS background switch method. It took surprisingly long for me to find a tutorial on this:
http://wellstyled.com/css-nopreload-rollovers.html |
![]() |
| Tags |
| array, javascript, not working, preload |
| Thread Tools | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Should I preload these images | thewebkid | JavaScript Forum | 5 | Dec 27th, 2007 19:19 |
| Preload bar not working in HTML site | peebman2000 | Flash & Multimedia Forum | 3 | Feb 21st, 2007 20:14 |
| How do you make mp3 preload sequentially? | ScottJensen | Starting Out | 4 | Feb 21st, 2007 13:36 |
| IE6 image preload problem | glesig | JavaScript Forum | 2 | Oct 30th, 2006 12:59 |
| Preload Flash Video | Paula | Flash & Multimedia Forum | 23 | Oct 13th, 2006 17:48 |