Getting buttons working, not functional yet bruh

This commit is contained in:
Michał Gdula 2022-08-07 09:07:18 +01:00
parent 21152358f1
commit 6a60375904
12 changed files with 177 additions and 92 deletions

View file

@ -1,13 +0,0 @@
$(document).ready(function() {
button = document.getElementById("back-to-top");
window.onscroll = function() {scrollFunction()};
function scrollFunction() {
if (document.body.scrollTop > 300 || document.documentElement.scrollTop > 20) {
button.style.right = "1rem";
} else {
button.style.right = "-2.5rem";
}
}
});