Compare commits
2 commits
a25ea40300
...
e9271c3ef1
Author | SHA1 | Date | |
---|---|---|---|
e9271c3ef1 | |||
a2e23623d6 |
1 changed files with 13 additions and 9 deletions
|
@ -1,3 +1,5 @@
|
||||||
|
window.onload = (event) => {
|
||||||
|
if ((document.documentElement.scrollHeight / window.screen.availHeight ) > 1.5) {
|
||||||
window.addEventListener("scroll", () => {
|
window.addEventListener("scroll", () => {
|
||||||
var winScroll = document.body.scrollTop || document.documentElement.scrollTop;
|
var winScroll = document.body.scrollTop || document.documentElement.scrollTop;
|
||||||
var height = document.documentElement.scrollHeight - document.documentElement.clientHeight;
|
var height = document.documentElement.scrollHeight - document.documentElement.clientHeight;
|
||||||
|
@ -10,3 +12,5 @@ window.addEventListener("scroll", () => {
|
||||||
toTop.classList.toggle("show");
|
toTop.classList.toggle("show");
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in a new issue