Created
January 19, 2017 16:08
-
-
Save jeffpowrs/6e20b48f139a7d084f30b118afa5a4da to your computer and use it in GitHub Desktop.
Exported from Popcode. Click to import: https://popcode.org/?gist=6e20b48f139a7d084f30b118afa5a4da
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>Parts of Speech: We Do</title> | |
</head> | |
<body> | |
<h1 id = "header">This page is about using variables with jQuery.</h1> | |
<div id="background"> | |
<div id ="sentence"></div> | |
</div> | |
</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
/* | |
YOU DO: Variable & jQuery practice | |
*/ | |
// Challenge #1 | |
// Create a variable that holds a CSS color. | |
// for example "blue" | |
// Challenge #2 | |
// FIRST Use jQuery to select the HTML element with the ID of background. | |
// ** Remember that the ID is CASE-SENSITIVE. | |
// THEN append the variable's value inside of the HTML element you selected | |
// using jQuery. | |
// Challenge #3 | |
// FIRST Use jQuery to select the HTML element with the ID of "background" again. | |
// ** Remember that the ID is CASE-SENSITIVE. | |
// THEN set the "background-color" of the HTML element to the variable's value | |
// using 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
#header{ | |
color: red; | |
} | |
#background { | |
height: 600px; | |
outline: 1px solid black; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment