title: Dojo slider incrementing/decrementing
body: <p>I have implemented a dojo slider for image changing on html canvas. If the slider is incremented we call showNextImage and if the slider is decremented we call showPrevImage. How to implement this? I've tried using the onChange function but I can't get the old value from the slider.</p>
  
  <pre><code> var slider = new dijit.form.HorizontalSlider({
          name: "slider",
          value: 0,
          minimum: 0,
          maximum: 10,
          discreteValues: 11, 
          intermediateChanges: true,
          style: "width:300px;",
          class:"dhSlider",
          disabled:false, 
          container: viewportWrapper,
  
          onChange: function(value) {
  
              var valueNew = a;
  
              if(value &gt; valueNew)
              console.debug(valueNew);
  
              var a = value;
          }
      });
  </code></pre>
  
  <p>To simplify: I just want a function that tells me if the slider value was incremented or decremented.</p>