Bootstrap Slider Knockout Binding Example

This is an example for using a Knockout binding on the Bootstrap Slider: https://github.com/seiyria/bootstrap-slider.

The Knockout binding allows you to use an observable as a value for the slider and to customize the options of the slider via knockout params.

Simple example with default options

<input type="text" class="slider form-control" data-bind="sliderValue: selectedValue"/>

Selected value:

Example with options

<input type="text" class="slider form-control" data-bind="sliderValue: {value: selectedValue, min:0, max: 22, step: 2, tooltip: 'always'}"/>

Selected value: