title: jQuery Move div with arrow keys
body: <p>I'm trying to move a div using the arrow keys. I have the following code which is not working for me. Do you see anything wrong with it. <strong>Check jsfiddle at <a href="http://jsfiddle.net/N5Ltt/1/" rel="noreferrer">http://jsfiddle.net/N5Ltt/1/</a></strong></p>
  
  <pre><code>$(document).keydown(function(e) {
      switch (e.which) {
      case 37:
          $('div').stop().animate({
              left: '-= 10'
          }); //left arrow key
          break;
      case 38:
          $('div').stop().animate({
              top: '-= 10'
          }); //up arrow key
          break;
      case 39:
          $('div').stop().animate({
              left: '+= 10'
          }); //right arrow key
          break;
      case 40:
          $('div').stop().animate({
              top: '+= 10'
          }); //bottom arrow key
          break;
      }
  })
  </code></pre>