Allow anchor links to automatically load JS tabs
Created by: ucffool
Currently it's necessary to add a small junk of JS (created below) to activate NAV tabs/pills based on the anchor link provided on the tab/pill itself when a page is loaded. This is for deep linking to a tab/pill on a page. This feature request is to integrate this behaviour automatically as part of bootstrap v4 JS.
// Show appropriate pill based on #anchor in URL
var url = window.location.href;
if (url.indexOf("#") > 0){
var activeTab = url.substring(url.indexOf("#") + 1);
$('.nav[role="tablist"] a[href="#'+activeTab+'"]').tab('show');
}