diff options
Diffstat (limited to 'downloads')
-rw-r--r-- | downloads/index.html | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/downloads/index.html b/downloads/index.html index f8ab833..fb5fe69 100644 --- a/downloads/index.html +++ b/downloads/index.html @@ -4,11 +4,16 @@ nav1-show: true nav1-weight: 9 title: 'Downloads' -# Select the correct tab based on the anchor hash in the URL. -# TODO: better validation, use explicit arch list. inlinejs: | $( - function() { + loadTabByHash(); + ); +--- +<script> + // Select the right tab based on the hash. + // TODO: we also want to be able to change the hash based on some clicks + // TODO: better validation, use explicit arch list. + function loadTabByHash() { var h = window.location.hash; var hb = '#other-arches a'; var h2 = hb + '[href="' + h + '"]'; @@ -16,11 +21,9 @@ inlinejs: | h2 = hb + ':first'; }; $(h2).tab('show'); - } - ); ---- - -<div class="row"> + } +</script> +<div class="row" onhashchange="loadTabByHash()"> <div class="col-xs-12 col-md-6"> <div class="panel panel-default featured-panel"> <div class="panel-body"> |