Headroom
Use Headroom.js library to add sticky navigation menu functionality to the navbar
Usage
In order to enable headroom for the navbar add the class .headroom
to the main .navbar
element. You can update the options of Headroom.js in js/pixel.js
.
if (d.querySelector('.headroom')) {
var headroom = new Headroom(document.querySelector("#navbar-main"), {
offset: 0,
tolerance: {
up: 0,
down: 0
},
});
headroom.init();
}