Skip to content
Advertisement

Headroom.js navbrand and navlinks

I am using Headroom.js in my bootstrap website, and so far so good, working fine the way I want. I have a question though: Is there any way to change navbrand and customize navlinks when in “notTop”?! Let me be clearer, When fixed, I use a transparent navbar with a white version of the logo and white navlinks, BUT, when scrolled down, I need the navbar white transparent, navlinks darker/black, and a black version of my logo. Most likely it can be done but I haven’t been able to find a solution for this. Thanks in advance.

Advertisement

Answer

Here is how you can achieve the desired effect. Simply apply styles based on top and notTop scenario. Run the working stack snippet below to see it in action.

JavaScript
JavaScript
JavaScript
User contributions licensed under: CC BY-SA
5 People found this is helpful
Advertisement