Search results
If you don't need the change to animate then you don't need to use any special plugins - I'd just use the native JavaScript window.scrollTo() method -- passing in 0, 0 will scroll the page to the top left instantly.
The scrollTop property sets or returns the number of pixels an element's content is scrolled vertically. See Also: The scrollLeft Property. The CSS overflow Property. The onscroll Event. Syntax. Return the scrollTop property: element.scrollTop. Set the scrollTop property: element.scrollTop = pixels. Property Values. Return Value. More Examples.
16 mar 2018 · A huge list of free "scroll to top" plugins and code snippets. All built on JavaScript & jQuery with custom JS scrolling animations to match.
23 sie 2020 · In this short tutorial, we'll see how to implement one with css and pure (vanilla) javascript. The simplest way to get a scroll to top button is to have an html element at the top and a link near the end of your page that calls it: <div id="scroll-to-top"></div> <!-- ... --> <a href="#scroll-to-top"></a>.
23 maj 2022 · In this tutorial we’ll be creating a scroll to top button with JavaScript. These buttons allow users to quickly return to the top of the page when clicked making them especially useful when using mobile devices with long pages of content.
SCSS 48.8%. Lightweight, Material Design inspired plugin for scrolling on top of the html page (with jQuery or TypeScript) - bartholomej/material-scrolltop.
5 kwi 2023 · In this hands-on guide, we will learn how to make an animated HTML/CSS/JS button to scroll to the top in Vanilla JavaScript.