Skip to content

Commit

Permalink
Merge pull request #838 from ygowthamr/scrollToTopIssue
Browse files Browse the repository at this point in the history
Enhanced ScrollTop Button Functionality
  • Loading branch information
ankit071105 authored Nov 1, 2024
2 parents c471ab3 + ecef05d commit af438dc
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -1697,6 +1697,15 @@ <h4>FIND US</h4>
<!-- AOS Library & Initialization Script -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/aos/2.3.4/aos.js"></script>
<script>
const scrollTopBtn = document.getElementById("topBtn");
scrollTopBtn.style.setProperty('visibility', 'hidden', 'important');
window.addEventListener('scroll', function() {
if (window.scrollY > 100) {
scrollTopBtn.style.setProperty('visibility', 'visible', 'important');
} else {
scrollTopBtn.style.setProperty('visibility', 'hidden', 'important');
}
});
AOS.init();
</script>

Expand Down

0 comments on commit af438dc

Please sign in to comment.