title: jQuery slider “change” event: How do I determine who called it?
body: <p>I got a slider that is used as a time-line in my music player. The min value is 0 and the max vlaue is the song length (in seconds). Each second (I do this with a timer), the slider moves and the value is set to the current time. This code line looks like that: </p>
  
  <pre><code>$("#sliderTime").slider("option", "value", document.sound.controls.currentPosition);
  </code></pre>
  
  <p>The user is able to slide/click the slider and jump to another point in the song, this is by firing the function 'play(startPlayFromHere)'. It looks like that:</p>
  
  <pre><code>$("#sliderTime").slider({
     ...
    change: function (event, ui) { play(ui.value) },
  });
  </code></pre>
  
  <p>The problem is that both the code line in the timer and the user are calling the same 'change' event of the the slider, and the user can't move the slider.</p>
  
  <p><strong>So my question is how can I determine whether the user called the change event or not (that means it was the timer)?</strong></p>
  
  <p>I hope it's clear enough,
  Thanks!</p>