Compare commits
No commits in common. "e9271c3ef1f21b2b4f4a03717f8f62beccd067bf" and "a25ea40300125cba6a788217c53f623eca3bd7d6" have entirely different histories.
e9271c3ef1
...
a25ea40300
1 changed files with 9 additions and 13 deletions
|
@ -1,6 +1,4 @@
|
|||
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 height = document.documentElement.scrollHeight - document.documentElement.clientHeight;
|
||||
var scrolled = (winScroll / height) * 100;
|
||||
|
@ -11,6 +9,4 @@ window.onload = (event) => {
|
|||
if ((window.scrollY > 0 && !toTop.classList.contains("show")) || (window.scrollY <= 0 && toTop.classList.contains("show"))) {
|
||||
toTop.classList.toggle("show");
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
Loading…
Reference in a new issue