https://github.com/mathiasbynens/jquery-smooth-scrolling
Smooth anchor scrolling plugin for jQuery.
https://github.com/mathiasbynens/jquery-smooth-scrolling
Last synced: 2 months ago
JSON representation
Smooth anchor scrolling plugin for jQuery.
- Host: GitHub
- URL: https://github.com/mathiasbynens/jquery-smooth-scrolling
- Owner: mathiasbynens
- Created: 2009-12-15T20:07:12.000Z (over 15 years ago)
- Default Branch: master
- Last Pushed: 2015-04-16T21:16:41.000Z (about 10 years ago)
- Last Synced: 2025-04-12T09:57:19.253Z (2 months ago)
- Language: JavaScript
- Homepage: https://mths.be/smoothscroll
- Size: 124 KB
- Stars: 74
- Watchers: 3
- Forks: 43
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Smooth Scrolling jQuery Plugin
## Notice
Nowadays you should really use `scroll-behavior: smooth;` in CSS instead of a JavaScript solution.
## Demo & Examples
## Example Usage
### Simple – Inside entire document
Find all links to anchors in the same document, and make them scroll smoothly when clicked:
```js
$('html').smoothScroll();
```### Simple – Inside a specified element
Find all links to anchors in the same document inside `#content`, and make them scroll smoothly when clicked:
```js
$('#content').smoothScroll();
```### Specifying animation speed
```js
$('html').smoothScroll(300);
```_– [Mathias](http://mathiasbynens.be/)_