knockout-inview
2.5.0 • Public • Published 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) {
});
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);
Versions
Current Tags
- VersionDownloads (Last 7 Days)
- 2.5.0
93
Version History
Package Sidebar
Install
Weekly Downloads