title: Slide event with jqSlider and knockout js
body: <p>I have a bindingHandler like so:</p>
  
  <pre><code>ko.bindingHandlers.percentageSlider = {
  init: function (element, valueAccessor, allBindingsAccessor) {
      var options = allBindingsAccessor().percentageSliderOptions || {};
      $(element).slider(options);
      ko.utils.registerEventHandler(element, "slidechange", function () {
          var observable = valueAccessor();
          observable($(element).slider("value"));
      });
      ko.utils.domNodeDisposal.addDisposeCallback(element, function () {
          $(element).slider("destroy");
      });
      ko.utils.registerEventHandler(element, "slide", function () {
          var observable = valueAccessor();
          observable($(element).slider("value"));
      });
  },
  update: function (element, valueAccessor) {
      var value = lo.unwrap(valueAccessor());
      $(element).slider("value", value);
  
  }
  };
  </code></pre>
  
  <p>And a template binding the slider like so:</p>
  
  <pre><code>&lt;tr&gt;
      &lt;td class="caption-cell"&gt;@Translate("EditProbability")&lt;/td&gt;
      &lt;td width="75%"&gt;
          &lt;div style="float:left;" data-bind="percentageSlider: probability, percentageSliderOptions: {min: 0, max: 100, range: 'min', step: 10}"&gt;&lt;/div&gt;
          &lt;div style="float:left;margin:0 0 0 10px" data-bind="dynamicText: function(){ return probability() + '%'; }"&gt;&lt;/div&gt;
      &lt;/td&gt;
  &lt;/tr&gt;
  </code></pre>
  
  <p>The handler dynamicText looks like this:</p>
  
  <pre><code>ko.bindingHandlers.dynamicText = {
  'update': function (element, valueAccessor) {
      var value = lo.unwrap(valueAccessor());
      if (typeof value === 'function') {
          value = value(element);
      }
      if ((value === null) || (value === undefined)) {
          value = "";
      }
      if (typeof element.innerText == "string") { element.innerText = value; }
      else { element.textContent = value; }
  }
  };
  </code></pre>
  
  <p>Now my problem is that the slider has irregular behaviour, sometimes I can't get to 100% and sometimes the value is a couple of tens away from what it should be. If I just click once on the slider it always goes to the right position. I want the percentage to update while sliding the slider and I also want the slider to get updated correctly by knockout (with the update event). What approach should I take here? Thanks for reading.</p>