diff --git a/assets/js/_main.js b/assets/js/_main.js index acfb9f53f7ce..f2414d18d59c 100644 --- a/assets/js/_main.js +++ b/assets/js/_main.js @@ -59,7 +59,7 @@ $(document).ready(function() { var smoothScrolling = false; $(window).bind("popstate", function (event) { $.smoothScroll({ - scrollTarget: location.hash, + scrollTarget: decodeURI(location.hash), offset: -20, beforeScroll: function() { smoothScrolling = true; }, afterScroll: function() { smoothScrolling = false; } @@ -103,7 +103,7 @@ $(document).ready(function() { if (top <= scrollTop && scrollTop < bottom) { // Mark all ancestors as active links[i].link.parents("li").children("a").addClass('active'); - if (links[i].href !== location.hash) { + if (links[i].href !== decodeURI(location.hash)) { history.replaceState(null, null, links[i].href); } return;