# knockout-inview

> Simple knockout binding to toggle a value when an element comes into or leaves the viewport.

Latest version **2.5.0** (published 2016-03-14) · ISC license · 0 weekly downloads

## Install

```sh
npm install knockout-inview
pnpm add knockout-inview
yarn add knockout-inview
bun add knockout-inview
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.5.0 |
| Published | 2016-03-14 |
| First published | 2015-10-15 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 4 |
| Author | Michael Shick |
| Maintainers | mshick |
| Keywords | knockout, binding, viewport, inview, waypoints |

## Links

- npm: https://www.npmjs.com/package/knockout-inview
- Repository: https://github.com/ronik-design/knockout-inview
- Homepage: https://github.com/ronik-design/knockout-inview#readme
- Issues: https://github.com/ronik-design/knockout-inview/issues
- npm.io page: https://npm.io/package/knockout-inview

## Alternatives

- [pagerjs](https://npm.io/package/pagerjs.md) — 60 weekly downloads
- [whistle.savefor-mock](https://npm.io/package/whistle.savefor-mock.md) — 4 weekly downloads
- [@bcc-code/db_masker](https://npm.io/package/@bcc-code/db_masker.md) — 0 weekly downloads
- [mocksimple](https://npm.io/package/mocksimple.md) — 0 weekly downloads
- [@react-shimeji/character-red-medic-by-tesspy-665b23](https://npm.io/package/@react-shimeji/character-red-medic-by-tesspy-665b23.md) — 0 weekly downloads

## Recent versions

- 2.5.0 (latest) — 2016-03-14
- 2.4.0 — 2016-02-24
- 2.3.1 — 2016-02-11
- 2.3.0 — 2016-02-06
- 2.2.2 — 2016-02-06
- 2.2.1 — 2016-02-06
- 2.2.0 — 2016-02-05
- 2.1.0 — 2016-02-03
- 2.0.0 — 2015-10-24
- 1.0.3 — 2015-10-20
- 1.0.2 — 2015-10-20
- 1.0.1 — 2015-10-16
- 1.0.0 — 2015-10-15

## README

# knockout-inview
Simple knockout binding to toggle a value when an element comes into or leaves the viewport.

# Usage
```html
<div data-bind="inview: foo"></div>
```

```js
var foo = ko.observable(false);
foo.subscribe(function (val) {
  // will be triggered when inview update the val
});
```

# Installation

This is how I use it with a Webpack bundled project. Your set-up may be different.

```sh
$ npm install knockout-inview --save-dev
```

```js
import ko from "knockout";
import inview from "knockout-inview";

ko.bindingHandlers.inview = inview(ko);
```

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