mirror of
https://github.com/Fluffy-Bean/image-gallery.git
synced 2025-05-22 11:24:56 +00:00
Getting buttons working, not functional yet bruh
This commit is contained in:
parent
21152358f1
commit
6a60375904
12 changed files with 177 additions and 92 deletions
|
@ -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";
|
||||
}
|
||||
}
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue