Skip to content

Instantly share code, notes, and snippets.

@kirsten
Created March 15, 2017 18:19
Show Gist options
  • Save kirsten/28ac960b4718a41bce4989f5783e66ea to your computer and use it in GitHub Desktop.
Save kirsten/28ac960b4718a41bce4989f5783e66ea to your computer and use it in GitHub Desktop.
Exported from Popcode. Click to import: https://popcode.org/?gist=28ac960b4718a41bce4989f5783e66ea
<!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>
{"enabledLibraries":["jquery"]}
$('button').click(function() {
// Add some jQuery to change the page's background-color css to the color entered in the input field.
});
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