How to code a slide out navigation | Part 2: The JavaScript

Kevin Powell on YouTubeWatch on YouTube

SaveMark complete

Sign in to save videos and track what you’ve finished.

BeginnerUI21 min

About this video

A short tutorial that adds JavaScript interactivity to a slide-out navigation menu, using querySelector and classList add and toggle, with a comparison of arrow functions and traditional function syntax. It continues a CSS-based website build.

What you’ll learn

  • Select page elements with querySelector
  • Toggle a navigation class with classList.toggle
  • Compare arrow functions with traditional function syntax