Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ixkaito/jquery.smoothscroll.js
jQuery plugin to animate scrolling to anchor links
https://github.com/ixkaito/jquery.smoothscroll.js
Last synced: 28 days ago
JSON representation
jQuery plugin to animate scrolling to anchor links
- Host: GitHub
- URL: https://github.com/ixkaito/jquery.smoothscroll.js
- Owner: ixkaito
- License: mit
- Created: 2017-08-19T03:46:25.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2019-04-23T16:32:11.000Z (over 5 years ago)
- Last Synced: 2024-10-04T17:34:11.221Z (about 2 months ago)
- Language: JavaScript
- Homepage: https://www.npmjs.com/package/jquery.smoothscroll.js
- Size: 18.6 KB
- Stars: 9
- Watchers: 4
- Forks: 3
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# jquery.smoothscroll.js
[![GitHub release](https://img.shields.io/github/release/ixkaito/jquery.smoothscroll.js.svg?style=flat-square)](https://github.com/ixkaito/jquery.smoothscroll.js/releases)
[![npm](https://img.shields.io/npm/v/jquery.smoothscroll.js.svg?style=flat-square)](https://www.npmjs.com/package/jquery.smoothscroll.js)
[![license](https://img.shields.io/github/license/ixkaito/jquery.smoothscroll.js.svg?maxAge=2592000&style=flat-square)](https://github.com/ixkaito/jquery.smoothscroll.js/blob/master/LICENSE)jQuery plugin to animate scrolling to anchor links
## Downloading or installing via npm
[![ZIP](https://img.shields.io/badge/download-zip-yellow.svg?longCache=true&style=for-the-badge)](https://github.com/ixkaito/jquery.smoothscroll.js/archive/master.zip)
[![ZIP](https://img.shields.io/badge/download-tar.gz-orange.svg?longCache=true&style=for-the-badge)](https://github.com/ixkaito/jquery.smoothscroll.js/archive/master.tar.gz)or
```bash
$ npm install --save-prod jquery.smoothscroll.js
```## Loading jQuery and jquery.smoothscroll.js
```html
```
**Webpack or Browserify**
```javascript
global.$ = global.jQuery = require('jquery');
require('jquery.smoothscroll.js');
```## Usage
```javascript
$(function() {
$('a[href*="#"]').smoothscroll();
});
```## Options and Settings
```javascript
$('a[href*="#"]').smoothscroll({
duration: 400,
easing: 'swing',
offset: 0,
hash: true,
focus: true,
});
```## Copyright
Kite [@ixkaito](https://github.com/ixkaito)
## License
MIT