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 |
|
#1
|
|||
|
|||
|
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 |
|
|
|
#2
|
||||
|
||||
|
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:
|
|
#3
|
|||
|
|||
|
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
|
|
#4
|
||||
|
||||
|
Re: preload isn't working
Google is your friend on this one.
You'd still be better off editing them, though. I know the work sucks, but the background switch is a much better method as it avoids the IE flicker bug and squeezes around those without JS quite well. It also works instantly, whereas those with slow internet connections may have to wait until the rest of the page finishes loading before the other images load. |
|
#5
|
|||
|
|||
|
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.
|
|
#6
|
||||
|
||||
|
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 |
|
#7
|
|||
|
|||
|
Re: preload isn't working
alright, thanks
|
![]() |
| 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 |