nav
element slides onto screen after scroll past header
.
A short script in vanilla JS.
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; }