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) {
|
$('#scroll-top').on('click', function() {
|
||||||
event.preventDefault();
|
|
||||||
scrollTo(0);
|
scrollTo(0);
|
||||||
|
window.history.pushState('', document.title, window.location.pathname); // Reset hash in URL
|
||||||
});
|
});
|
||||||
|
|
||||||
$('a[href^="#"] ').on('click', function(event) {
|
$('a[href^="#"] ').on('click', function(event) {
|
||||||
|
|
Loading…
Reference in a new issue