Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

the scroll to top button has been adt ded at the about page . #723

Closed
wants to merge 2 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 44 additions & 1 deletion about.html
Original file line number Diff line number Diff line change
Expand Up @@ -396,12 +396,37 @@
/* border-radius: 10px; */
}


/* scroll to top button */
.go-top-btn {
position: fixed;
bottom: 35px;
right: 35px;
cursor: pointer;
border-radius: 50%;
height: 50px;
width: 50px;
background: #000000;
border: none;
display: flex;
justify-content: center;
align-items: center;
z-index: 1000;
transition: background-color 0.3s, box-shadow 0.3s, transform 0.3s;
}
.go-top-btn:hover {
background-color: #000000;
box-shadow: 0px 6px 12px rgba(0, 0, 0, 0.25);
transform: translateY(-2px);
}
</style>


<head>
<body>
<!-- scroll to top button -->
<button class="go-top-btn">
<img width="25px" src="arrow_upper.png" alt="go top">
</button>
<!-- preloader -->
<div id="preloader">
<div class="wrapper">
Expand Down Expand Up @@ -819,6 +844,24 @@ <h2>Subscription Successful!</h2>
});

})();

//js for go top button in about page
const goTopBtn = document.querySelector('.go-top-btn');
window.addEventListener('scroll', checkHeight)
function checkHeight() {
if (window.scrollY > 200) {
goTopBtn.style.display = "flex"
} else {
goTopBtn.style.display = "none"
}
}
goTopBtn.addEventListener('click', () => {
window.scrollTo({
top: 0,
behavior: "smooth"
})
})

</script>
<script src="script/progressbar.js"></script>
<script src="active.js"></script>
Expand Down