Using jQuery to trigger the menu on a click

For this stage, we have to link to jQuery and our own JavaScript file. We'll do this at the bottom of the HTML, just above our closing </body> and </html> tags. Copy a link to the jQuery CDN that's hosted on Google's site. Below this, add a link to our own JS file. We're going to put this file in the js folder and we're going to name that file scripts.js:

<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script><script src="js/scripts.js"></script></body></html>

Also, let's copy this to the same place in the shark-movies.html. Let's create that new JavaScript file as well.

In Sublime Text an easy way to create a new file, is to use Cmd + N (on Mac) or Ctrl + N (on ...

Get Mastering CSS now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.