I have a navbar with nav-links that properly applies the “active” class to the nav-link when the page is loaded, however if I am on another page and click on the link, the active class is not applied, and therefore is not bold.
This is what displays when I initially load a page:
There must something specific on your page that’s causing this.
Just made 2 tests with the nav js script included on the layout page then added the nav partial on the layout, then on the content pages - in both cases it works. Are you sure the js include is not included more than once on any of the pages?
Just in case it wasn’t obvious…if I remove “internal” from the link, it works as expected because there is a page refresh. With internal, is where I have the problem.
I just tested with internal on and off - the behavior is the same, the active menu gets the active class.
Can you maybe provide a link where we can check your page?