- We have already gotten the value of color for you on line 4 of the javascript section. Set the color of the body to this color.
- 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:39
-
-
Save alexpelan/ad3e99bbf7e0ba1cc2a481e6ee2c2543 to your computer and use it in GitHub Desktop.
Exported from Popcode. Click to import: https://popcode.org/?gist=ad3e99bbf7e0ba1cc2a481e6ee2c2543
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> | |
<p>To: <input id="to"> </p> | |
<p>Message: <input id="message"> </p> | |
<p>Color: <input id="color"></p> | |
<p>From: <input id="from"></p> | |
<button>Send</button> | |
<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"]} |
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
$("button").click(function() { | |
var to = $("#to").val(); | |
$(".to").append(" " + to); | |
var color = $("#color").val(); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment