I've been able to locate the JS to either expand a specific accordion...
$(document).ready(function () {
location.hash && $(location.hash + '.collapse').collapse('show');
});
Or to open a specific tab...
var gotoHashTab = function (customHash) {
var hash = customHash || location.hash;
var hashPieces = hash.split('?'),
activeTab = $('[href=' + hashPieces[0] + ']');
activeTab && activeTab.tab('show');
}
// onready go to the tab requested in the page hash
gotoHashTab();
// when the nav item is selected update the page hash
$('.nav a').on('shown', function (e) {
window.location.hash = e.target.hash;
})
// when a link within a tab is clicked, go to the tab requested
$('.tab-pane a').click(function (event) {
if (event.target.hash) {
gotoHashTab(event.target.hash);
}
});
Used along with a link or url that looks like this...
http://mysite.com/page#tab_or_accordion_id
What I'd like to be able to do is open a specific tab ID then expand a specific accordion ID. I would like to use this to make in-article jumps to a specific, categorized (with tabs) FAQ. I can't seem to figure out how to stitch these together to get it working. Consider me new to working with jQuery and Bootstrap -- any help would be greatly appreciated.