diff --git a/static/js/portico/help.js b/static/js/portico/help.js index 0a686bd0ea..a805ec5846 100644 --- a/static/js/portico/help.js +++ b/static/js/portico/help.js @@ -178,8 +178,8 @@ function scrollToHash(container) { $('.help .sidebar h1, .help .sidebar h2, .help .sidebar h3').removeAttr('id'); // Scroll to anchor link when clicked - $('.markdown .content h1, .markdown .content h2, .markdown .content h3').on('click', function () { - window.location.href = window.location.href.replace(/#.*/, '') + '#' + $(this).attr("id"); + $(document).on('click', '.markdown .content h1, .markdown .content h2, .markdown .content h3', function () { + location.hash = $(this).attr("id"); }); $(".hamburger").click(function () {