Skip to content

Commit bb83dd5

Browse files
committed
scrollHeight var added in scroll project
1 parent f2da01d commit bb83dd5

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

10-scroll/final/app.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,10 @@ window.addEventListener("scroll", function () {
4040
navbar.classList.remove("fixed-nav");
4141
}
4242
// setup back to top link
43-
if (height > 500) {
43+
44+
if (scrollHeight > 500) {
45+
console.log("helo");
46+
4447
topLink.classList.add("show-link");
4548
} else {
4649
topLink.classList.remove("show-link");

10-scroll/final/styles.css

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -365,7 +365,6 @@ footer p {
365365
border-radius: var(--radius);
366366
color: var(--clr-white);
367367
animation: bounce 2s ease-in-out infinite;
368-
369368
visibility: hidden;
370369
z-index: -100;
371370
}

0 commit comments

Comments
 (0)