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.
11 wrz 2024 · The Element.scrollTop property gets or sets the number of pixels by which an element's content is scrolled from its top edge. This value is subpixel precise in modern browsers, meaning that it isn't necessarily a whole number.
Lightweight, Material Design inspired plugin for scrolling on top of the html page (with jQuery or TypeScript) - bartholomej/material-scrolltop.
Star 3.7k. master. README. MIT license. jQuery.scrollTo. Lightweight, cross-browser and highly customizable animated scrolling with jQuery. Installation. The plugin requires jQuery 1.8 or higher. Via bower: bower install jquery.scrollTo. Via npm: npm install jquery.scrollto. Via packagist:
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.
9 mar 2016 · goTop.js is a dead simple and super lightweight jQuery plugin that auto reveals a 'Scroll To Top' button as you scroll to the very bottom of the webpage. Demo Download.