From the course: reveal.js: Online Presentations
Unlock the full course today
Join today to access over 22,700 courses taught by industry experts or purchase this course individually.
Controlling your presentation with API events
From the course: reveal.js: Online Presentations
Controlling your presentation with API events
Being able to control the flow of the presentation with JavaScript is somewhat useful. We learned how to do that in the last video. The real power of reveal.js comes when you learn how to execute commands based on the different events that get fired by the API. That means that you can learn to do things with reveal.js whenever something happens. Like with any other piece of JavaScript, in order to track events, you create event listeners. So I need to go all the way to the bottom of my slide. I definitely want to make sure that I do this after I call the reveal.js JavaScript Library. Now, I'm going to put this after the initialize function. So, it's going to go all the way to the end of my code and I'll do a script tag here. And inside that script tag, I want to add an event listener to the Reveal object. So Reveal.addEventListener. And first, I'm just going to look for the ready event. That's the event that happens whenever reveal.js is ready. So I'm going to call a function literal…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
-
-
(Locked)
Exporting your presentations to PDF1m 54s
-
(Locked)
Creating an auto-play presentation2m 45s
-
(Locked)
Adding functionality with external JavaScript libraries6m 35s
-
(Locked)
Working with API functions5m 53s
-
(Locked)
Controlling your presentation with API events6m 46s
-
(Locked)
Placing Adobe Edge animations inside reveal.js4m 46s
-
(Locked)
Controlling an Adobe Edge animation with reveal.js6m 10s
-
(Locked)
-