Add JavaScript for mobile navbar
Add and load the JavaScript that provides the interactive behavior for the navbar on a mobile device.
The JavaScript should implement the following behaviors:
- Toggle the navbar menu when the user clicks the burger icon
- Adds the is-active class to the burger icon when the navbar menu is open
- Adds the is-active class to the navbar menu when the navbar menu is open
- Prevents the page from scrolling when the navbar menu is open (toggle class on document element)
- Only the menu itself should scroll if it overflows the page height
The JavaScript file should be named 04-mobile-navbar.js so it's loaded after other scripts.
Edited by Dan Allen