knockout.toggle
Version:
Knockout binding to toggle boolean view model properties
18 lines (12 loc) • 366 B
Markdown
# Knockout Toggle Binding
> Knockout binding to toggle boolean view model properties.
## Installation
```
npm install knockout-toggle
```
## Usage
Include the script with your module bundler, then use the binding like so:
```html
<button data-bind="toggle: myProp">Toggle the thing</button>
<span data-bind="visible: myProp">It's ON</span>
```