Topic: How to change class on navbar fixed?

Evidencija POS free asked 5 years ago


I was looking at some of your free templates. e.g. I liked one for Software company.

Question is: onload of page, navbar is transparent, which is nice feature as it seams like it blends in image, but then as you scroll down, nav element has one more CSS class, "top-nav-collapse". By adding this element, you are adding background color so it acts nice while scrolling.

I've managed even to identify this in mdb.css (sections with navbar:not if I am right :) ).

So, can you please explain me which event, and how do you add this class to this element?


Thank You


Marta Wierzbicka staff answered 5 years ago

Hi, this class .top-nav-collapse is adding by JS script. If sth doesn't work on your MDB Free pack, send me a message to Best, Marta

Please insert min. 20 characters.


Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.



Specification of the issue

  • User: Free
  • Premium support: No
  • Technology: MDB jQuery
  • MDB Version: -
  • Device: -
  • Browser: -
  • OS: -
  • Provided sample code: No
  • Provided link: No