Browse files

Propagate the fragment identifier to the documentation version switcher.

  • Loading branch information...
1 parent 05932f9 commit d48b79618d5d9d50032cc1b585b10e9dd6958044 @bmispelon bmispelon committed Oct 31, 2013
Showing with 8 additions and 0 deletions.
  1. +8 −0 docs/templates/docs/doc.html
View
8 docs/templates/docs/doc.html
@@ -52,6 +52,14 @@
// use a delay that should work on all modern computers. should, not will.
}, 50);
});
+
+ // Propagate the fragment identifier to the links in the version switcher
+ if (window.location.hash) {
+ $('#doc-versions a').each(function(){
+ var anchor = $(this);
+ anchor.attr('href', anchor.attr('href') + window.location.hash);
+ });
+ }
</script>
{% endif %}
{% endblock extrabody %}

0 comments on commit d48b796

Please sign in to comment.