BOOTSTRAP navbar class=”active”

While building a WebApp using BOOTSTRAP I’ve encountered a query regarding the navbar. Upon navigating to other page, the item selected does not automatically become active.

I found a solution using JavaScript and come up with another solution using PHP.

Using PHP:

php

Using JavaScript:

js1

Untitled

Ta Da! Comment Below for suggestions!

Advertisements
BOOTSTRAP navbar class=”active”