Skip to content

Commit

Permalink
scrollsmooth
Browse files Browse the repository at this point in the history
  • Loading branch information
spring-ford committed Jun 9, 2024
1 parent 8ee21f7 commit 82a881e
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions projects.html
Original file line number Diff line number Diff line change
Expand Up @@ -188,8 +188,10 @@ <h1 style="font-size: 3em; text-align: center;">Games</h1>
};

backToTopButton.onclick = function () {
document.body.scrollTop = 0;
document.documentElement.scrollTop = 0;
window.scrollTo({
top: 0,
behavior: 'smooth'
});
};
</script>
</body>
Expand Down

0 comments on commit 82a881e

Please sign in to comment.