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”

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s