# vanillasticky

> Fix elements to the viewport when they scroll past a position. No jQuery!

Latest version **0.2.1** (published 2015-07-17) · MIT license · 0 weekly downloads

## Install

```sh
npm install vanillasticky
pnpm add vanillasticky
yarn add vanillasticky
bun add vanillasticky
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.2.1 |
| Published | 2015-07-17 |
| First published | 2015-07-01 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | AlexKvazos |
| Maintainers | alexkvazos |
| Keywords | javascript, sticky, fixed, vanilla, agnostic |

## Links

- npm: https://www.npmjs.com/package/vanillasticky
- Repository: https://github.com/AlexKvazos/VanillaSticky.js
- Issues: https://github.com/AlexKvazos/VanillaSticky.js/issues
- npm.io page: https://npm.io/package/vanillasticky

## Recent versions

- 0.2.1 (latest) — 2015-07-17
- 0.2.0 — 2015-07-16
- 0.1.0 — 2015-07-02
- 0.0.1 — 2015-07-01

## README

VanillaSticky
---

Fix elements to the viewport when they scroll past a position. No jQuery, fully agnostic!



##Installing

Bower
```
$ bower install vanillasticky
```

NPM
```
$ npm install vanillasticky

var VanillaSticky = require('vanillasticky');
```


##Usage

Adds a dom node to the list of nodes that will get fixed when they reach that vertical offset with the top of the screen.
```
VanillaSticky.attach(DOMNode, offset);
```

Removea dom node from the watched nodes
```
VanillaSticky.detach(DOMNode);
```

---
_Source: https://npm.io/package/vanillasticky · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
