fix links for updated design

Change-Id: I64421748ed2a7d21ed63f7eeaac66b6311f22659
This commit is contained in:
Jim Phillips
2015-11-19 20:19:31 -05:00
parent 30f5a23d99
commit 23817c7775
2 changed files with 18 additions and 15 deletions

View File

@@ -8,20 +8,6 @@ jQuery.ajax({
dataType: "script"
});
$(window).hashchange(function(){ showHashTab(); });
function showHashTab(){
console.log('showHashTab');
if(location.hash){
var activeTab = $('[href=' + location.hash + ']');
if (activeTab.length) {
activeTab.tab('show');
} else {
$('.nav-tabs a:first').tab('show');
}
}
}
function getParameterByName(name) {
name = name.replace(/[\[]/, "\\[").replace(/[\]]/, "\\]");
var regex = new RegExp("[\\?&]" + name + "=([^&#]*)"),

View File

@@ -210,7 +210,24 @@
nav();
$(window).hashchange(function(){ nav(); });
showHashTab();
$(window).hashchange(function(){ nav(); showHashTab();});
function showHashTab(){
console.log('showHashTab');
if(location.hash){
var activeTab = $('#nav-spy').find('[href=' + location.hash + ']');
if (activeTab.length) {
activeTab.tab('show');
} else {
//$('.nav-tabs a:first').tab('show');
console.log('no length');
var parentTab = $(location.hash).closest('.section.tab-pane');
$('#nav-spy').find('[href=#' + $(parentTab).attr('id') + ']').tab('show');
}
}
}
// list-group-accordion functionality
var listAccordion = $('.list-group-accordion');