Example

Show the position of the mouse pointer:

$(document).mousemove(function(e){
  $("span").text("X: " + e.pageX + ", Y: " + e.pageY);
});

Try it yourself »

Definition and Usage

The pageY() property is the position of the mouse pointer, relative to the top edge of the document.

Syntax

event.pageY

Parameter Description
event Required. Specifies the event to use. The event parameter comes from the event binding function