Previous Message
Next Message

whatever:hover fast and easy via Dynamic Properties

Sent by Klaus Hartl on 10 July 2005 20:08


Hi all,

this may be of some interest here... I found a way to easily implement
whatever:hover using Dynamic Properties. Here's an example of the code:

EOMB:
..whatever {
     background: #808080;
}
..whatever:hover, .whateverhover {
     background: #eaeaea;
}

IE/Win:
..whatever {
     background-color: expression(this.runtimeStyle.backgroundColor,
this.onmouseover = function() { this.className += ' whateverhover'; },
this.onmouseout = function() { this.className =
this.className.replace('whateverhover', ''); });
}

It looks odd, but it works!

Here's a demo page:
http://stilbuero.de/demo/whatever_hover/
....and a blog entry of mine about all this:
http://stilbuero.de/blog/2005/07/whateverhover-fast-and-easy.html


Happy Coding,

Klaus


--
[EMAIL-REMOVED]

______________________________________________________________________
css-discuss [EMAIL-REMOVED]]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/
Previous Message
Next Message

Message thread:

Possibly related: