Loading video player…

Making the Page Respond (Overview)

Welcome to Making the Page Respond. Priya hosts a monthly board game night, and her page lists the guests and this month’s games. So far, it changes only when she edits its script. In this course, her guests get to use it.

Right now, Priya’s guests reply in a group chat. On the RSVP board you’ll build, a guest clicks Bring Azul, and Azul’s card turns pale blue. Two votes put Catan ahead and give its card a crimson border. A Quick games only button hides the games over 45 minutes, then brings them back. Each of those clicks runs a function your script handed to the browser.

What You’ll Learn

The course has five sections:

  • Handing Over Functions: treat functions as values.
  • Responding to Clicks: have your code run on every click.
  • Finding and Changing Elements: mark Priya’s guests as they arrive.
  • Project: Priya’s RSVP Board: build the board yourself.
  • Reviewing What You’ve Learned: check what you know with a quiz, and watch the summary.

By the end of this course, you’ll be able to make a page react to clicks, find elements anywhere in it, and switch classes, attributes and data on them, checking each change in the Elements panel.

Before You Start

You need JavaScript basics: loops, functions, and arrays of objects. You should also be able to serve a page with HTML, CSS, and a script, change text on it, and build elements from data. You’ll need a current version of Chrome or Edge, an editor, and a local server, such as VS Code with its Live Preview extension.

If you’ve already built Priya’s page, keep your files and carry on in them. If you’re starting here, the lessons show you how to type along in the Console of an empty browser tab, and the project gives you starter files.

How the Course Works

Text lessons are for typing along, and videos show what moves. The first three sections each end with an exercise that you solve in the browser, and automated tests check your code. The project comes in three graded steps, and then you explain your board to the mentor, RealJS’s AI tutor. A quiz and a summary close the course.

The next lesson is Write Arrow Functions.

Download

Course Slides (.pdf)

602.7 KB
Download

Sample Code (.zip)

10.8 KB

00:00 Welcome to Making the Page Respond. Priya’s page lists the guests and games for her monthly board game night. So far, it changes only when she edits its script.

00:12 Here’s the board you’ll build her. It answers guests’ clicks.

00:17 Right now, guests reply in a group chat. On the board, a guest clicks Bring Azul, and its card turns pale blue. Two votes put Catan ahead and give it a crimson border.

00:31 The Quick games only button hides games over 45 minutes, then brings them back. Each click runs a function your script handed to the browser. First, in Handing Over Functions, you treat functions as values.

00:49 In Responding to Clicks, your code runs on every click. In Finding and Changing Elements, you mark guests as they arrive. Then, in the project, you build the board.

01:02 By the end, you’ll be able to make a page react to clicks, find elements anywhere in it, and switch classes, attributes and data on them, checking each change in the Elements panel.

01:14 You need JavaScript basics and should be able to serve a page and build elements from data. Use Chrome or Edge and VS Code’s Live Preview. Built Priya’s page already?

01:25 Keep your files. Starting here? Lessons show how to type along in an empty tab, and the project has starter files.

01:35 Text lessons are for typing along, and videos show what moves. The first three sections end with a browser exercise, checked by automated tests. The project has three graded steps, then you explain your board to the mentor, RealJS’s AI tutor.

01:52 A quiz and summary close the course. Next up: Write Arrow Functions.

Become a Member to join the conversation.