title: Detect swipe from edge in jQuery Mobile
body: <p>I want to detect if users swipe from the edge or not before I open the panel with <code>$("#panel").panel("open");</code>. Here is the code</p>
  
  <pre><code>$("#main").on("swiperight",function(event){
  var data = event.originalEvent.touches ? event.originalEvent.touches[0] : event,
      coords = [data.pageX, data.pageY];
  
  console.log(coords);
  });
  </code></pre>
  
  <p>However the <code>coords</code> didn't return anything because I got error:</p>
  
  <blockquote>
    <p>Uncaught TypeError: Cannot read property 'touches' of undefined</p>
  </blockquote>
  
  <ol>
  <li><p>So is there a way to get coordinate when swipe happens?</p></li>
  <li><p>Or is there an easy way to detect if the staring position is from
  the left edge instead?</p></li>
  </ol>
  
  <p>Thanks.</p>