0.0.2 • Published 8 years ago

anchorscroll v0.0.2

Weekly downloads
8
License
MIT
Repository
github
Last release
8 years ago

anchorscroll

Dependency-free smooth-scrolling to hashed anchors

Install

With yarn:

$ yarn add anchorscroll

With npm:

$ npm install --save anchorscroll

Usage

const anchorscroll = require('anchorscroll');

// anchorscroll(speed, selector, offset)

// Speed: the default is 0.5
// This defines how quickly you scroll from current position to anchor

// Selector: the default is '.achorscroll'
// This determines the classname for anchorscroll to watch

// Offset: the default is 30
// You can use this to offset the scroll by the height of a top bar for example