-1

How do I go about about outputting the sliders value (selectedV) when the track is clicked. Currently i can only achieve this by dragging the sliders handle.

I click the track to move the handle the observable does not register.

self.selectedV = ko.observable(2);

Here is my example:

http://jsfiddle.net/ERz7u/21/

Siguza
  • 21,155
  • 6
  • 52
  • 89
user994694
  • 133
  • 10

1 Answers1

0

As @Origineil suggested, changing the following piece of code from

$(element).on('slide', function (ev) {
    valueObservable(ev.value);
});

to

$(element).on('slideStop', function (ev) {
    valueObservable(ev.value);
});

does give the results you expect. (at least in chrome )

http://jsfiddle.net/gonefishern/ERz7u/30/

Nathan Fisher
  • 7,961
  • 3
  • 47
  • 68