jQuery event.pageX property
Example
Return the position of the mouse pointer:
$(document).mousemove(function(event){
$("span").text("X: " + event.pageX + ", Y: " + event.pageY);
});
Try it »
Definition and Usage
The event.pageX property returns the position of the mouse pointer, relative to the left edge of the document.
**Tip:** This event property is usually used together with event.pageY property.
Syntax
event
.pageX
| Parameters | Description |
|---|---|
| event | Required.event The parameters come from the event binding function. |
jQuery event methods