Skip to content

ajfarkas/slideNav.js

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 

Repository files navigation

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; }

About

nav element slides onto screen after scroll past header

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published