title: How can I detect the distance that the user's mouse has moved?
body: <p>I'm trying to detect the distance the mouse has moved, in pixels. I am currently using:</p>
  <pre><code>$(document).mousemove(function(event) {
      var startingTop = 10,
          startingLeft = 22,
          math = Math.abs(((startingTop - event.clientY) + (startingLeft - event.clientX)) + 14) + 'px';
      $('span').text('From your starting point(22x10) you moved:   ' + math);
  });
  </code></pre>
  <p>However, I  don't feel like this is the right way to do this, or is it? It doesn't feel to consistent to me.</p>
  <p>Here is a demo of how it is working right now: <a href="http://jsfiddle.net/Em4Xu/1/" rel="noreferrer">http://jsfiddle.net/Em4Xu/1/</a></p>
  <h3>Extra Details:</h3>
  <p>I'm actually developing a drag &amp; drop plugin and I want to create a feature called <code>distance</code>, like draggable has it, where you have to pull your mouse a certain amount of pixels before it drags. I'm not 100% sure how to do this, so first I need to get the pixels that the mouse has moved from the startingTop and startingLeft position.</p>
  <p>Does anyone have any suggestions?</p>