2.5.0 • Published 8 years ago

knockout-inview v2.5.0

Weekly downloads
26
License
ISC
Repository
github
Last release
8 years ago

knockout-inview

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

Usage

<div data-bind="inview: foo"></div>
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.

$ npm install knockout-inview --save-dev
import ko from "knockout";
import inview from "knockout-inview";

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

8 years ago

2.4.0

8 years ago

2.3.1

8 years ago

2.3.0

8 years ago

2.2.2

8 years ago

2.2.1

8 years ago

2.2.0

8 years ago

2.1.0

8 years ago

2.0.0

9 years ago

1.0.3

9 years ago

1.0.2

9 years ago

1.0.1

9 years ago

1.0.0

9 years ago