title: jQuery - Access X and Y coordinates (custom event)
body: <p>I'm working on an image slide and making it touch enabled. I'm doing this by using a code snippet mentioned in this article: <a href="http://blog.safaribooksonline.com/2012/04/18/mapping-mouse-events-and-touch-events-onto-a-single-event/" rel="nofollow">http://blog.safaribooksonline.com/2012/04/18/mapping-mouse-events-and-touch-events-onto-a-single-event/</a></p>
  
  <p>The author mentions that by using his code, which triggers a normalizing event on touch events, the access of X and Y coordinates is much easier. And that's exactly what I found difficult. I can't seem to access these values at all. I've tried everything I can come up with.</p>
  
  <p>Here's the code: <a href="http://jsfiddle.net/BC8dr/3/" rel="nofollow">http://jsfiddle.net/BC8dr/3/</a></p>
  
  <p>normalizeEvent:</p>
  
  <pre><code>function normalizeEvent(type, original, x, y){
  
      return jQuery.Event(type, {
  
          pageX: x,
          pageY: y,
          originalEvent: original
  
      });
  
  }
  </code></pre>
  
  <p>At the bottom of the code I have commented where I wan't the access:</p>
  
  <pre><code>jQuery(current_slide).bind(TouchMouseEvent.DOWN, onDownEvent);
  
  function onDownEvent(e){
  
      // This is where I need X and Y coordinate access
  
      // This will return result: undefined
      var x = e.pageX;
      console.log(x);
  }​
  </code></pre>
  
  <p>So my question is: how do I access X and Y coordinates?</p>
  
  <p>*NOTE: I'm pretty new to JS/jQuery</p>