Previous Message
Next Message

whatever:hover fast and easy via Dynamic Properties

Sent by Klaus Hartl on 19 July 2005 13:01


Jan Brasna wrote:
>> It seems to be working only in IE 6.0. May someone else confirm this 
>> results?
> 
> 
> Yes. Many friends and colleagues reported it this morning. It fails on 
> the { } JS block.


Thats right. I hadn't tested in IE 5. There is another way to create an 
anonymous function in JavaScript and this one works in IE 5 as well. :-)

For example:

input {
     /* whatever:focus */
     background-color: expression(
         this.onfocus = new Function("this.className += ' onfocus';"),
         this.onblur = new Function("this.className = 
this.className.replace('onfocus', '')")
     );
}


Thanks you all for the hint!

Happy coding, Klaus


PS: It seems to me, that one should mention, that this technique will 
not work in IE for the Mac (no support for dynamic properties).

______________________________________________________________________
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: