This simple jQuery plugin is a part of N4-Framework modules. It can be used to retract / expand / lock a navbar depending on user actions and scroll.
N4 Framework using this repo: https://github.com/Nepmia/N4-Framework
Simply import it on your project, the default navbar height is 50px so please edit navbar_height
to adjust it to your navbar's height.
If you need to lock the navbar from retracting you can do it by simply adding a class to it. This class can be set in navbar_lockclass
.
The script can also make the navbar togglable by hovering an element on your page, if you wish to use that please give its class / id name in navbar_hovertrigger
like #elt
or .elt
.
This plugin target a css class called navbar
but if you wish to change the target (it must be the parent of your entire navbar) you can change navbar_target
.
navbar_height
must be a str including value unit.navbar_lockclass
must be a str, it can only be a str and must be a class name, it cannot be changed to id by adding#
and it doesn't need a.
before the classnamenavbar_hoverTrigger
andnavbar_target
must be a str, can be a class name or an id using the proper selector (#
or.
)