I am using Django and integrated Bootstrap with Django. Here is my HTML code for the navigation bar:
I recently ran into this problem and tried every solution I could find. Eventually, I came to this. This example assumes the path to this content is yoursite.com/about Give your link an id.
- About
var path = $(location).attr('pathname')
var pa = path.split("/")
$('#'+pa[1]).tab('show')