Skip to content

Commit

Permalink
fix: Implement scroll-to-top button functionality
Browse files Browse the repository at this point in the history
  • Loading branch information
veepanshu-kasana committed Nov 7, 2024
1 parent 2aeec70 commit 9620883
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion about.html
Original file line number Diff line number Diff line change
Expand Up @@ -510,7 +510,17 @@ <h1>About Us 🚀</h1>

<button onclick="moveToTop()" id="topBtn" title="Go to top" style="display:flex; position: fixed; right: 30px; z-index: 100000;">
<i class="fa fa-arrow-up" aria-hidden="true"></i>
</button>
</button>

<script>
// Scroll to top function
function moveToTop() {
window.scrollTo({
top: 0,
behavior: 'smooth'
});
}
</script>

<footer class="footer-container">
<div class="footer-top">
Expand Down

0 comments on commit 9620883

Please sign in to comment.