Clear hash when scrolling to top
This commit is contained in:
parent
8915b12414
commit
6ac31eb8e0
1 changed files with 2 additions and 2 deletions
|
@ -55,9 +55,9 @@ function scrollTo(offset) {
|
|||
);
|
||||
}
|
||||
|
||||
$('#scroll-top').on('click', function(event) {
|
||||
event.preventDefault();
|
||||
$('#scroll-top').on('click', function() {
|
||||
scrollTo(0);
|
||||
window.history.pushState('', document.title, window.location.pathname); // Reset hash in URL
|
||||
});
|
||||
|
||||
$('a[href^="#"] ').on('click', function(event) {
|
||||
|
|
Loading…
Reference in a new issue