Skip to content

willhoag/anchor-scroll

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

anchor-scroll

Smooth scrolling for anchor links using scroll-to-element

NPM

Installation

Download node at nodejs.org and install it, if you haven't already.

npm install anchor-scroll --save

Usage

anchorScroll = require("anchor-scroll");

anchorScroll.init({
	updateUrl: true,
	offset: 0,
	ease: 'out-bounce',
	duration: 1500,
	selector: '.smooth-scroll' // default a[href*='#']
});

anchorScroll.destroy();

Dependencies

License

MIT

About

Smooth scrolling for anchor links using scroll-to-element

Resources

License

Stars

Watchers

Forks

Packages

No packages published