From the course: Scrollytelling: Creating a One-Page Web Experience

Unlock the full course today

Join today to access over 24,600 courses taught by industry experts.

Triggering events

Triggering events

- My Scrollytelling experience has structure, it has content, and it has style. But nothing's happening, other than writing the response object to the browser log, which is a start. But I need to actually make stuff happen now, so I'm going to go back to my code, and the first thing I'm going to do is this, I want to disappear those divs, and the easiest, simplest way to disappear them is to simply make them have a white background color. If I now look at my browser, and I scroll, look, the divs are there, they're still triggering the response object, logging that to the console, but they're invisible to me. I can't see them, 'cause they're all white with white text, so the contents there, but it's invisible. That's good. But what I need to do next is figure out how to make them visible when they scroll into view. What I'm going to do is I'm going to create a class called active. Now, if I have a…

Contents