I'm using the navbar from bootstrap however whenever I click on one of the page titles, the navbar doesn't highlight it to show that I'm on that page. For example, if I'm on the home page then the navbar looks like this:
However, if I click on About
, I go to the About page but the navbar still looks like this:
How do I make it highlight the page it's on? Thanks
Read documentation. You need to apply class="active"
to the li
element that you want to be active. It is not handled automatically. You need to implement it however you see fit.
It could be either a JQuery solution or a server side solution. Either one could be more or less appropriate depending on the way your website is built.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With