Re: Down to One Question: Javascript (was Two Questions: One Java script, One Tab
by Andrew McFarland <aamcf(at)aamcf.co.uk>
|
Date: |
Wed, 13 Feb 2002 22:29:43 +0000 |
To: |
<hwg-techniques(at)hwg.org> |
References: |
pdc ntlworld |
|
todo: View
Thread,
Original
|
|
At 16:03 13/02/02 -0500, Angel One wrote:
<.snip/>
>Is this all just so the "hover" function will work in Nutscrape?
<.snip/>
No. This method won't work in Netscape 4.x. There is no easy way to get
something like this to work in Netscape 4.x.
The main issue here, as I see it, is using JavaScript to change styles on
the fly. It's a useful technique to learn. Although any element can have
the :hover pseudo element applied to it in CSS2, support for it isn't very
good. (See http://aamcf.co.uk/temp/style_object3 for an example using
span:hover that doesn't work in Mozilla 0.9.8). This method can also be
generalized so that, for example, you mouseover one element and another
changes style, or you wanted styles to change depending on cookies stored
on the browser.
FWIW, there is a slightly better version of my solution on
http://aamcf.co.uk/temp/style_object2 That version changes the color of the
span from its preset color to white and back to its preset color. My
previous version changed the color from the preset color to white and then
to black.
Andrew
--
http://aamcf.co.uk/
HWG hwg-techniques mailing list archives,
maintained by Webmasters @ IWA