generated
This commit is contained in:
parent
818c0d8f09
commit
1691df4e77
2 changed files with 13 additions and 9 deletions
|
@ -1,4 +1,6 @@
|
|||
window.addEventListener("scroll", () => {
|
||||
window.onload = (event) => {
|
||||
if ((document.documentElement.scrollHeight / window.screen.availHeight ) > 1.5) {
|
||||
window.addEventListener("scroll", () => {
|
||||
var winScroll = document.body.scrollTop || document.documentElement.scrollTop;
|
||||
var height = document.documentElement.scrollHeight - document.documentElement.clientHeight;
|
||||
var scrolled = (winScroll / height) * 100;
|
||||
|
@ -9,4 +11,6 @@ window.addEventListener("scroll", () => {
|
|||
if ((window.scrollY > 0 && !toTop.classList.contains("show")) || (window.scrollY <= 0 && toTop.classList.contains("show"))) {
|
||||
toTop.classList.toggle("show");
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
BIN
public.zip
BIN
public.zip
Binary file not shown.
Loading…
Reference in a new issue