1.0.6 • Published 6 years ago

anchor-offset v1.0.6

Weekly downloads
3
License
ISC
Repository
github
Last release
6 years ago

anchor-offset

Offset scroll position for page anchors.

npm version Travis build status Coverage Status Dependency Status devDependency Status

Useful for websites that have fixed content at the top of the page, such as a navigation bar.

Usage

anchorOffset(offset)

ArgumentDefaultDescription
offset0The amount to offset in pixels.

Node

Install the package with npm.

npm install --save anchor-offset

Import the anchor-offset module.

import anchorOffset from 'anchor-offset';

anchorOffset(50);

Web

Get the latest release and include it in your page.

<script src="anchor-offset.js"></script>
<script>
  anchorOffset(50);
</script>
1.0.6

6 years ago

1.0.5

7 years ago

1.0.4

7 years ago

1.0.3

7 years ago

1.0.2

7 years ago

1.0.1

7 years ago