Created
November 3, 2011 00:29
-
-
Save theabraham/1335425 to your computer and use it in GitHub Desktop.
Guessing Game
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
- HTML FILE | |
<html> | |
<head> | |
<title>Guessing Game</title> | |
</head> | |
<body> | |
<div><!-- output text will go in here --></div> | |
<input type="text" /> | |
<button>Guess</button> | |
</body> | |
<!-- TODO: load jquery.js and main.js with two '<script>' tags --> | |
</html> | |
- JAVASCRIPT FILE | |
// Tips: | |
// > use jqapi.com for jQuery documentation (checkout text() and val() methods!) | |
// > Math.ceil(Math.random() * 25) will give you a random number 1 - 25. | |
// > get something barebones working, and then add flair (like effects or new mechanics.) | |
// 1) create 3 variables to access your output '<div>', input '<input>', and button '<button>' tags. | |
// 2) create any other variables you may need. | |
// 3) bind a click event to your '<button>' tag. | |
// 4) fetch the users input and handle it; dish out some helpful output in response (i.e. 'Your guess was too low!'.) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment