Disappearing navbar

I am trying to code a navbar that disappears as users scroll here is the link to my code pen: https://codepen.io/ericnelson699/pen/LYboMoz
please tell me what I am doing wrong I ran the javascript analyzer and its not telling me what the problem is

Two things:

  • You need to add jquery to your project.
  • You are adding the “sticky” class to the navbar so the the navbar has two classes: ‘navbar’ and ‘sticky’. But in your CSS you are using: .navbar .sticky which is not the same thing.

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.