[thelist] tying events and styles together in JS?

Tom Dell'Aringa pixelmech at yahoo.com
Wed Feb 19 10:35:01 CST 2003


--- Cake <cake at brothercake.com> wrote:
> DHTML behaviours :)
> Make a file called "hover.htc" and put this something like this in
> it:
> <public:component>
>
> <attach event="onmouseover" handler="highlight" />
> <attach event="onmouseout" handler="lolight" />
>
> <script type="text/javascript">
>
> 	function highlight() {
> 		element.style.backgroundColor="yellow";
> 		}
>
> 	function lolight() {
> 		element.style.backgroundColor="white";
> 		}
>
> </script>
> </public:component>
> Then you attach it to the TR in your stylesheet:

> has more info. Of course it will only work in IE5 and IE6 but that
> doesn't matter - Mozilla, Opera 7, Safari and Konqueror can do this
> in pure CSS ;) The only 'serious' DHTML browser that misses out is
> the mac version of IE5.

Hmmm droooollll... sounds awesome! Now you say the other browsers can
do this in pure css...how can I accomplish that so its cross browser?
Right now this job is IE5+ only, but I'm trying to talk them in to
doing as much cross-browser stuff as possible for the future. Plus, I
want to know for my own purposes...

T


=====
var me = tom.pixelmech.webDeveloper();

http://www.pixelmech.com/
http://www.maccaws.com/
[Making A Commercial Case for Adopting Web Standards]

__________________________________________________
Do you Yahoo!?
Yahoo! Shopping - Send Flowers for Valentine's Day
http://shopping.yahoo.com



More information about the thelist mailing list