title: Javascript touch movement, track when user swipes from edges
body: <p>I need to track user touch events. I want to track when user swipes from edges.<br>
  For example when user swipes from left vertical edge I will show a menu, from right edge make an alert, and show another menu when user swipes from top.</p>
  
  <p>I couldn't find a similar usage.<br>
  How can I make this behaviour ? Tracking swipe from edges ?<br>
  I tried this with <a href="http://eightmedia.github.io/hammer.js/" rel="noreferrer">hammer.js</a> because I use jQuery,<br>
  But other libraries (<a href="http://quojs.tapquo.com/" rel="noreferrer">QuoJS</a>, <a href="http://labs.rampinteractive.co.uk/touchSwipe/demos/" rel="noreferrer">TouchSwipe</a>, <a href="http://touchyjs.org/" rel="noreferrer">Touchy</a> etc.) are ok for me.</p>
  
  <p>Fiddle: <a href="http://jsfiddle.net/mavent/ym4JV/51/" rel="noreferrer">http://jsfiddle.net/mavent/ym4JV/51/</a></p>
  
  <pre><code> $(document).hammer()
      .on("tap doubletap hold drag swipe pinch rotate dragup dragdown swipeup swipedown", function (event) {
          $('#updateArea').html(event.type + ". direction:" + event.gesture.direction  + "&lt;br&gt;deltaX:" + event.gesture.deltaX.toFixed(2)         + ". deltaY:" + event.gesture.deltaY.toFixed(2) + "&lt;br&gt; centerX:" + event.gesture.center.pageX.toFixed(2) + ". centerY:" + event.gesture.center.pageY.toFixed(2));
          var currentText = $('#logArea').text();
          $('#logArea').text(""+currentText+" . "+event.type);
      });
  </code></pre>
  
  <p><img src="https://i.stack.imgur.com/VCbjE.gif" alt="enter image description here"></p>