Created
September 14, 2013 23:57
-
-
Save seykron/6566779 to your computer and use it in GitHub Desktop.
Test for bindings between JavaScript, DOM and CSS.
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>DOM Binding Test</title> | |
</head> | |
<body> | |
<button id="action">Submit!</button> | |
<script type="text/javascript"> | |
document.addEventListener("DOMContentLoaded", function (event) { | |
var button = document.getElementById("action"); | |
button.addEventListener("click", function (event) { | |
button.style.backgroundColor = "#000000"; | |
button.style.color = "#ffffff"; | |
}); | |
}); | |
</script> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment