We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 05e6bf0 commit bae890eCopy full SHA for bae890e
1 file changed
javascripts/scroll-up.js
@@ -1,6 +1,8 @@
1
export default function () {
2
// function to scroll up to page top
3
const PageTopBtn = document.getElementById('js-scroll-top')
4
+ if (!PageTopBtn) return
5
+
6
PageTopBtn.addEventListener('click', (e) => {
7
window.scrollTo({
8
top: 0,
0 commit comments