enable back button for tabs

Change-Id: Ia2f40a5266a974133d32867eb699ceaea817ab71
This commit is contained in:
Jim Phillips 2015-05-26 10:09:05 -04:00
parent 60653017bd
commit 18b40a0613
2 changed files with 92 additions and 65 deletions

View File

@ -1,6 +1,17 @@
var _conv_host = (("https:" == document.location.protocol) ? "https://d9jmv9u00p0mv.cloudfront.net" : "http://cdn-1.convertexperiments.com");
document.write(unescape("%3Cscript src='" + _conv_host + "/js/10012224-10012014.js' type='text/javascript'%3E%3C/script%3E"));
(function () {
window.addEventListener("popstate", function (e) {
var activeTab = location.hash ? $('[href=' + location.hash + ']') : $('[href=#home]');
if (activeTab.length) {
activeTab.tab('show');
} else {
$('.nav-tabs a:first').tab('show');
}
});
})();
function generateLinks(url, title) {
var currentLocation = window.location;
var linkUrl = currentLocation.protocol + '//' + currentLocation.host + currentLocation.pathname + url;
@ -174,4 +185,8 @@ $(document).ready(function () {
}
);
$('a[data-toggle="tab"]').on('click', function (e) {
history.pushState(null, null, $(this).attr('href'));
});
});

View File

@ -26,7 +26,9 @@ h4, h5 {
font-weight: bold;
}
h3.no-margin { margin-top: 0; }
h3.no-margin {
margin-top: 0;
}
a.toc-backref {
color: #41454D;
@ -494,25 +496,35 @@ i.fa-file-pdf-o {
}
@-webkit-keyframes rotateplane {
0% { -webkit-transform: perspective(120px) }
50% { -webkit-transform: perspective(120px) rotateY(180deg) }
100% { -webkit-transform: perspective(120px) rotateY(180deg) rotateX(180deg) }
0% {
-webkit-transform: perspective(120px)
}
50% {
-webkit-transform: perspective(120px) rotateY(180deg)
}
100% {
-webkit-transform: perspective(120px) rotateY(180deg) rotateX(180deg)
}
}
@keyframes rotateplane {
0% {
transform: perspective(120px) rotateX(0deg) rotateY(0deg);
-webkit-transform: perspective(120px) rotateX(0deg) rotateY(0deg)
} 50% {
}
50% {
transform: perspective(120px) rotateX(-180.1deg) rotateY(0deg);
-webkit-transform: perspective(120px) rotateX(-180.1deg) rotateY(0deg)
} 100% {
}
100% {
transform: perspective(120px) rotateX(-180deg) rotateY(-179.9deg);
-webkit-transform: perspective(120px) rotateX(-180deg) rotateY(-179.9deg);
}
}
.navbar-version { display: none; }
.navbar-version {
display: none;
}
@media (max-width: 767px) and (min-width: 0px) {
.navbar-default .navbar-text {