title: How to determine the direction on onmousemove event?
body: <p>On some condition I want to cancel <code>onmousemove</code> event when mouse goes down, for example. Is it possible to determine the direction of <code>onmousemove</code> event? jQ or JS is Ok.</p>
  
  <p>I have drag’n’drop elements. The user drags the elenment up. If, for example, the bottom of the element reaches some position in the document (i.e. <code>500px</code> from the top of the document) the <code>onmousemove</code> stops. And if the user will try to drag the element up again the function will not start. Only drag down will be possible for this element. So I thought it would be quite easy to do it by catching the direction of the <code>mousemove</code> event. But it seems there’s no such kind of standard properties.</p>