title: How to Detect Mousedown + Mousemove Left or Right Direction
body: <p>Can you please take a look at this demo and let me know how I can detect whether the mousemove is toward Left or Right?</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code> $('.container').mousedown(function(){
      $(this).mousemove(function(){
        //if Moves Left { console.log("Moving Left"); }
        //if Moves Right {  console.log("Moving Right"); }
      });
  });     
    $('.container').mouseup(function(){
      $(this).unbind("mousemove");
  });      </code></pre>
  <pre class="snippet-code-css lang-css prettyprint-override"><code>.container {
      height:200px;
      width:200px;
      background-color:#1abc9c;
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"&gt;&lt;/script&gt;
  &lt;div class="container"&gt;&lt;/div&gt;</code></pre>
  </div>
  </div>
  </p>