Created
March 15, 2017 18:19
-
-
Save kirsten/28ac960b4718a41bce4989f5783e66ea to your computer and use it in GitHub Desktop.
Exported from Popcode. Click to import: https://popcode.org/?gist=28ac960b4718a41bce4989f5783e66ea
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Page Title</title> | |
</head> | |
<body> | |
<h1>Change the background color!</h1> | |
<input placeholder="Enter a color"> | |
<button>Change background</button> | |
<p>Refer to <a href="https://en.wikipedia.org/wiki/Web_colors#HTML_color_names" target="_blank">this list</a> of HTML color names for color ideas, or try entering hex color codes!</p> | |
</body> | |
</html> |
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
{"enabledLibraries":["jquery"]} |
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
$('button').click(function() { | |
// Add some jQuery to change the page's background-color css to the color entered in the input field. | |
}); |
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
body { | |
font-family: sans-serif; | |
} | |
p { | |
font-size: 12px; | |
margin-top: 20px; | |
font-style: italic; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment