Skip to content

Instantly share code, notes, and snippets.

@jeffpowrs jeffpowrs/index.html
Created Jan 19, 2017

Embed
What would you like to do?
Exported from Popcode. Click to import: https://popcode.org/?gist=8ab6d16b32dc09215bc1a4ea6574e0c5
<!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>
/*
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.
#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
You can’t perform that action at this time.