posted
Hey, how do I set up an image so that when you hover over it with your mouse, it switches to a different image? Can that be done in raw HTML, or does it require something extra?
Posts: 1907 | Registered: Feb 2000
| IP: Logged |
posted
I thought onmouseover (or whatever it is) was javascript. I haven't touched either in too long to remember.
Posts: 5948 | Registered: Jun 2001
| IP: Logged |
posted
It is javascript, but I managed to make it work: www.geoffreycard.com ...
Now, I think my only problem is the size of the images. They're like 5K each, and it takes a second to switch when you mouseover them. (I've only done the top link so far.)
Posts: 1907 | Registered: Feb 2000
| IP: Logged |
posted
What you need to use is called a preload script, so the rollover images are already downloaded when you need them.
Just google for preload script and take your pic.
Also, you may find it useful to generate rollovers and such using software like Adobe's ImageReady (companion software to photoshop). It generates javascript code for you.
Posts: 15770 | Registered: Dec 2001
| IP: Logged |
posted
Geoff, are these your final versions of the images? Your rollovers aren't coming up 5k, they're more like 10 - 17k each, which might be why they're taking so long to come up.
posted
Hey, come on, guys, I can't learn anything if you do all the work for me!
And holy crap, I'd be in big trouble by now if I didn't know how to compress a JPEG I'm just sticking to the bigger files while I'm still working on them ... to ensure the finest quality and all.
Posts: 1907 | Registered: Feb 2000
| IP: Logged |
posted
Geoff, I believe that if you look at the finished code with the preloader, you should be able to reverse-engineer it and make your own.
Posts: 9945 | Registered: Sep 2002
| IP: Logged |