From the course: reveal.js: Online Presentations

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Working with API functions

Working with API functions

From the course: reveal.js: Online Presentations

Start my 1-month free trial

Working with API functions

Revealjs has a rich API library which you can use with javascript to control your presentation. Just about anything that you can do with code you can do through the javascript API methods. You can find the API in the revealjs documentation. And you see that we have methods for controlling the navigation For retrieving slide element as well as getting the indices of where we are in the presentation and checking to see whether or not we're in certain places. So, pretty straightforward. Let's go ahead and experiment with a few of them. We'll switch over to our presentation and I'm going to right click and select Inspect Element. Now I'm going to switch over to the console by clicking on this tab right here. And from here I can use the reveal object with a few methods to control my presentation. So I can say, reveal.right. And this should move the presentation to the next slide to the right. So if I do that again, and again, I'm going to get to this slide. And when I say reveal.right…

Contents