You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
On processing website a back-to-top button isn't present which is a common website feature.
I propose adding a "Scroll to Top" button that becomes visible as the user scrolls down the website page.
Tapping this button would smoothly scroll the user back to the top, providing a convenient and efficient way to navigate lengthy content.
I want to work on this issue.
The text was updated successfully, but these errors were encountered:
#scrollToTopBtn.show {
display: block;
}
js
// When the user scrolls down 20px from the top of the document, show the button
window.onscroll = function() {
scrollFunction();
};
function scrollFunction() {
if (document.body.scrollTop > 20 || document.documentElement.scrollTop > 20) {
document.getElementById("scrollToTopBtn").classList.add("show");
} else {
document.getElementById("scrollToTopBtn").classList.remove("show");
}
}
// When the user clicks on the button, scroll to the top of the document
document.getElementById("scrollToTopBtn").addEventListener("click", function() {
document.body.scrollTop = 0; // For Safari
document.documentElement.scrollTop = 0; // For Chrome, Firefox, IE and Opera
});
if this looks correct, Kindly assign me
On processing website a back-to-top button isn't present which is a common website feature.
I propose adding a "Scroll to Top" button that becomes visible as the user scrolls down the website page.
Tapping this button would smoothly scroll the user back to the top, providing a convenient and efficient way to navigate lengthy content.
I want to work on this issue.
The text was updated successfully, but these errors were encountered: