From the course: reveal.js: Online Presentations

Unlock the full course today

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

Adding functionality with external JavaScript libraries

Adding functionality with external JavaScript libraries

From the course: reveal.js: Online Presentations

Start my 1-month free trial

Adding functionality with external JavaScript libraries

In a lot of web projects, adding functionality to your pages mean using the script tag to add JavaScript files into your existing code. Reveal.js already uses a lot of libraries. So whether you add additional things is a little bit different. Let's say that we want to make this grocery list sortable. That's something that a library like jQuery UI makes super simple. So if you go to this page in the jQuery UI manual, you can see that we've got this list. And it can be made to be sortable just by clicking and dragging elements. Now, if you click on this link right here, it'll open up this window that shows you how this is done. And this is pretty easy. We're loading up first jquery, and then the jquery-ui library. And then we're executing a sortable command. We don't really need this disable selection one. And we're doing this inside the jquery function here. That happens after jquery is loaded. And then we simply have a list, right now with an ID of sortable. So, if I wanted to do that…

Contents