Skip to content

Commit

Permalink
Update scroll-up.js
Browse files Browse the repository at this point in the history
  • Loading branch information
heiskr authored Feb 23, 2021
1 parent 05e6bf0 commit bae890e
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions javascripts/scroll-up.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
export default function () {
// function to scroll up to page top
const PageTopBtn = document.getElementById('js-scroll-top')
if (!PageTopBtn) return

PageTopBtn.addEventListener('click', (e) => {
window.scrollTo({
top: 0,
Expand Down

0 comments on commit bae890e

Please sign in to comment.