Skip to content

Latest commit

 

History

History
19 lines (16 loc) · 563 Bytes

README.md

File metadata and controls

19 lines (16 loc) · 563 Bytes

slideNav.js

nav element slides onto screen after scroll past header.
A short script in vanilla JS.

instructions

Target navigation should be in a nav tag, and the first element of the page should have a header tag.
The navigation is hidden until the user scrolls past the bottom of the header, whereupon it slides into view.
And vice-versa.

I recommend adding some CSS in order to prevent a flash of the nav on pageload:

    nav{
      visibility: hidden; 
      position: fixed; }