- 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.
- Add a div with class
greeting-card
to your HTML. Inside this div, add a div with the classto
, a div with the classmessage
, and a div with the classfrom
- 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. - Repeat this process for message and from
- Use CSS and optionally additional HTML to add images and styling to your greeting card
Last active
January 11, 2018 03:49
-
-
Save alexpelan/87de8e40ed775c7df4eaa98d20092f4b to your computer and use it in GitHub Desktop.
Exported from Popcode. Click to import: https://popcode.org/?gist=87de8e40ed775c7df4eaa98d20092f4b
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> | |
</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