Skip to content

Instantly share code, notes, and snippets.

/* TODO: Program the following:
* Start the countdown timer whenever a question cell is clicked.
*
* 1. Add a click handler to all elements with the 'question-cell' class (like
* we did in click_handler.js), which does the following actions.
*
* 2. Call startCountdownTimer with three parameters:
*
* a) Timer length, in seconds (start with 10)
* b) A callback function which returns true when the timer should be
@emilygarvey
emilygarvey / badCode.js
Last active November 4, 2020 21:47
2.4 Do Now
//Answer below in the comments:
//This code can lead to errors because...
//I would improve this code by...
const car1 = {
doors: 2,
make: "Ford",
model: "mustang"
};

07.3 Input Fields and .val() Guided Practice

Instagram Comments Section

TASK: We want the user's input comment to show up on the webpage.

  1. Create an input field with a class and placeholder value.

  2. Declare a variable and use .val() to store the input data in the variable.

<!DOCTYPE html>
<html>
<head>
<title>Future Book Calculator</title>
<link href="https://fonts.googleapis.com/css?family=Bree+Serif" rel="stylesheet">
</head>
<body>
<div class="container">
<h1>Let me tell your <br>literary future...</h1>
<!DOCTYPE html>
<html>
<head>
<title>Treasure Hunt: Get Emily to Work!</title>
<link href="https://fonts.googleapis.com/css?family=Kirang+Haerang|Roboto+Condensed" rel="stylesheet">
</head>
<body>
<h1 id="start">It's Monday morning!<br>Make sure Emily overcomes the obstacles and gets to work on time!</h1>
<div class="alarm">
<p id="wake">Good morning! <br> Double click the alarm clock to make sure Emily wakes up on time!</p>
<!DOCTYPE html>
<html>
<head>
<title>HireMe! Michael J. Garvey</title>
<link href="https://fonts.googleapis.com/css?family=Kaushan+Script|Ropa+Sans" rel="stylesheet">
</head>
<body>
<h1>Michael J. Garvey</h1>
<marquee><img src="https://scontent-lga3-1.xx.fbcdn.net/v/t1.0-9/316038_107173212728795_1511388062_n.jpg?_nc_cat=0&oh=c495937f2cecf1bc02f6fe940b7b77c1&oe=5BA18206" alt="Michael J. Garvey is very secretive about his true identity"></marquee>
<h2 class="box">About Me</h2>
<!DOCTYPE html>
<html>
<head>
<title>The 2018 Garvey Awards</title>
<link href="https://fonts.googleapis.com/css?family=Chela+One|Fjalla+One|Gaegu|Lobster|Noto+Serif" rel="stylesheet">
</head>
<body>
<h2>Welcome to the much awaited and highly anticipated...</h2>
<h1><marquee><a href="https://www.instagram.com/ms.garvey/?hl=en" target="_blank">Garvey Awards</a></marquee></h1>
<img src="https://media.giphy.com/media/3b6tjTu536HY46hZXY/giphy-downsized.gif">