Last active
August 29, 2015 14:20
-
-
Save stepheneyer/ddd8b808af4b95a571a7 to your computer and use it in GitHub Desktop.
addEventListener and querySelector
This file contains 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
window.addEventListener("load", function (){ | |
alert("Loaded!"); | |
var clicker = document.querySelector("#clicker"); | |
clicker.addEventListener("click", function (event) { | |
alert("Yes, the button was clicked!"); | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment