- Add four inputs to the HTML for To, From, Message, and Color. They should have classes or IDs to use in your javascript later on.
- Add a button to your HTML.
- In Javascript, add a click handler for the button. The rest of the javascript should be written inside this click handler.
- Get the value of To from the appropriate input and use
.append()
to append it to the div with the class 'to' - Get the value of Color from the appropriate input and use
.css
to set the color of the body. - Get the value of the message from the appropriate input and use
.text()
to set the text of the div with the class message. - Get the value of the from input and use
.text()
to set the text of the div with the class from. - Use CSS and optionally additional HTML to add images and styling to your greeting card
Last active
January 11, 2018 03:47
-
-
Save alexpelan/a9ce680cee958aa7c7fe5e2f79ab38a3 to your computer and use it in GitHub Desktop.
Exported from Popcode. Click to import: https://popcode.org/?gist=a9ce680cee958aa7c7fe5e2f79ab38a3
This file contains hidden or 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>Greeting Card Maker</title> | |
</head> | |
<body> | |
<div class="greeting-card"> | |
<div class="to"> | |
Dear | |
</div> | |
<div class="message"> | |
</div> | |
From, | |
<div class="from"> | |
</div> | |
</div> | |
</body> | |
</html> |
This file contains hidden or 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"],"hiddenUIComponents":["console"]} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment