Skip to content

Instantly share code, notes, and snippets.

@kirsten
Created March 13, 2017 16:08
Show Gist options
  • Save kirsten/b7d4adc14ce48001e151cb400cf60519 to your computer and use it in GitHub Desktop.
Save kirsten/b7d4adc14ce48001e151cb400cf60519 to your computer and use it in GitHub Desktop.
Exported from Popcode. Click to import: https://popcode.org/?gist=b7d4adc14ce48001e151cb400cf60519
<!DOCTYPE html>
<html>
<head>
<title>Page Title</title>
</head>
<body>
<h1>Guess the number!</h1>
<input>
<button>Guess</button>
</body>
</html>
{"enabledLibraries":["jquery"]}
// Step 1: Create click handler.
// Step 2: Create variable that takes the value of input
// Step 3: Write an if statement that checks whether the value is less than the chosen number....
// Step 4: Write an if else statement...
// Step 5: Write an else statement...
body {
font-family: sans-serif;
}
input {
border: 0;
border-bottom: 2px solid black;
outline: 0;
padding: 5px;
font-size: 20px;
}
button {
margin: 0 10px;
background-color: white;
outline: 0;
border: 2px solid black;
border-radius: 3px;
padding: 5px 10px;
letter-spacing: .5px;
font-weight: bold;
font-size: 12px;
text-transform: uppercase;
}
button:hover {
color: white;
background-color: black;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment