Created
November 9, 2008 23:35
-
-
Save atinypixel/23379 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* You can use any element aside from the example below. | |
How it works is that you simply create .hover, .active styles | |
for whatever element you use this on. Works very well. Uses | |
the underscore hack to targe ie6. | |
*/ | |
input, button { | |
_azimuth: expression( | |
this.onmousedown = this.onmousedown || new Function("this.className += ' active'"), | |
this.onmouseup = this.onmouseup || new Function("this.className = this.className.replace('active','')"), | |
this.onmouseenter = this.onmouseenter || new Function("this.className += ' hover'"), | |
this.onmouseleave = this.onmouseleave || new Function("this.className = this.className.replace('hover','')"), 'inherit'); | |
} | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
input, button | |
:_azimuth expression(this.onmousedown = this.onmousedown || new Function("this.className += ' active'"), this.onmouseup = this.onmouseup || new Function("this.className = this.className.replace('active','')"), this.onmouseenter = this.onmouseenter || new Function("this.className += ' hover'"), this.onmouseleave = this.onmouseleave || new Function("this.className = this.className.replace('hover','')"), 'inherit') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment