And when a page is visited, active the tab identified by the fragment id. This allows linking to a specific tab.
Fixes #93.
ILEDGCVAFYW6UGYARTV65FJUYO2H2M57ENHMVH62ODY34H6QMPNQC
/* Ensure that pressing the back button on another page
navigates back to the previously selected tab on this
page. */
$(function() {
$('.nav-tabs').bind('show', function(e) {
var pattern = /#.+/gi;
var id = e.target.toString().match(pattern)[0];
history.replaceState(null, "", id);
});
});
$(function() {
if (window.location.hash) {
$(".nav a[href='" + window.location.hash + "']").tab('show');
}
})