diff options
author | Miodec <[email protected]> | 2023-03-06 15:52:38 +0100 |
---|---|---|
committer | Miodec <[email protected]> | 2023-03-06 15:52:38 +0100 |
commit | 8761b59d2f0aa7e497d14bec523ca0af6a3e0d87 (patch) | |
tree | d04fc8423e6d6ff9b1981e3e43f128f55f2b433e | |
parent | 85606bcb6c73acd3860c8b2025aff897f4aa58c9 (diff) | |
download | monkeytype-8761b59d2f0aa7e497d14bec523ca0af6a3e0d87.tar.gz monkeytype-8761b59d2f0aa7e497d14bec523ca0af6a3e0d87.zip |
fixed scroll to top button not working on all pages
-rw-r--r-- | frontend/src/ts/elements/scroll-to-top.ts | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/frontend/src/ts/elements/scroll-to-top.ts b/frontend/src/ts/elements/scroll-to-top.ts index fa3f7866d..795ec14a4 100644 --- a/frontend/src/ts/elements/scroll-to-top.ts +++ b/frontend/src/ts/elements/scroll-to-top.ts @@ -2,7 +2,7 @@ import * as ActivePage from "../states/active-page"; let visible = false; -$(".scrollToTopButton").on("click", () => { +$(document).on("click", ".scrollToTopButton", () => { window.scrollTo({ top: 0, behavior: "smooth" }); }); |