What do you want to save?
Add Code snippet
New code examples
-
Html 2021-11-02 22:01:06
scroll to top smooth safari
<!--Example of a button to scroll to top, Remember to use the same id on both the button and the function --> <button id='myBtn' > Click me to go to top! </button> <!-- When the user clicks on the button, scroll to the top ... Add solution -
Javascript 2021-10-08 16:58:11
Scroll to the top of the page using JavaScript?
// Get The Id var topPage = document.getElementById(`top-page`) // On Click, Scroll to the Top of Page topPage.onclick = () => window.scrollTo({ top: 0, behavior: 'smooth' }) // On scroll, Show/Hide the button window.onscroll = () => { window.sc... Add solution