Skip to content

Instantly share code, notes, and snippets.

@mrmoje
Created January 29, 2014 03:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mrmoje/8681546 to your computer and use it in GitHub Desktop.
Save mrmoje/8681546 to your computer and use it in GitHub Desktop.
A Pen by mrmoje.
<button id="login" onmouseover="turnWhite()">
Login Button. MouseOver to turn white
</button>
document.getElementById("login").onmouseover = function () { turnWhite(); }
function turnWhite(){
var myEventElement = turnWhite.caller.arguments[0].target;
myEventElement.className = "white";
}
#login{
background:black;
color:white;
}
#login.white{
background:white;
color:black;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment