knockout-contrib

:metal: KnockoutJS Goodies Monorepo

View the Project on GitHub Profiscience/knockout-contrib

bindings.toggle

Version Dependency Status Peer Dependency Status Dev Dependency Status Downloads

This package is intended for consumption via the @profiscience/knockout-contrib metapackage

Toggle an observable boolean on click. Disable with optional toggleDisable binding.

Usage

<div data-bind="toggle: myObsBool, toggleDisable: ko.observable(false)"></div>