Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
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
2 changes: 1 addition & 1 deletion public/css/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ body {
flex: 1;
width: 100%;
padding: 15px;
background: linear-gradient(135deg, #764ba2 0%, #48bb78 100%);
background: linear-gradient(135deg, #5263d9 0%, #7dc69b 100%);
color: #fff;
border: none;
border-radius: 14px;
Expand Down
7 changes: 3 additions & 4 deletions public/js/script.js
Original file line number Diff line number Diff line change
Expand Up @@ -419,6 +419,8 @@ if (scrollToTopBtn) {
e.preventDefault();
console.log('Button clicked via event listener');
scrollToTop();


});

// Show/hide button based on scroll position
Expand Down Expand Up @@ -474,10 +476,7 @@ function scrollToTop() {
console.log('Visual feedback applied');
}

// Force immediate scroll first (to ensure it works)
document.documentElement.scrollTop = 0; // Chrome, Firefox, IE, Opera
document.body.scrollTop = 0; // Safari
window.scrollTo(0, 0); // Fallback


console.log('Immediate scroll executed');
console.log('New scroll position after immediate:', window.pageYOffset);
Expand Down