jQuery event.pageX Property

jQuery event.pageX property is a read-only and returns the X (horizontal) position (in pixels) of mouse pointer, to the left edge of the document.


Parameter Type Description
event Event Required. The event parameter comes from event bind method


This example returns the mouse pointer position.

<!DOCTYPE html>
  <title>jQuery event.pageX and event.pageY property</title>
  <script src="jquery-latest.min.js"></script>
        $("span").text("pageX: " + event.pageX + ", pageY:  " + event.pageY); 
  <p>Mouse pointer position</p>

Run it...   »