event.pageY is a Number on the jQuery event object. It is the mouse pointer’s vertical position in pixels relative to the top edge of the document (scroll included). Added in jQuery 1.0.4. Pair it with event.pageX for a full document (x, y) point.
Syntax
Start with these common calls. Keep them short and readable.
jQuery
event.pageY // Number — px from document top (read-only)
$(document).on("mousemove", function (event) {
// pageX: horizontal · pageY: vertical
console.log(event.pageX, event.pageY);
});
pageY → document coordinates (includes scroll)
clientY → viewport coordinates (visible window)
offsetY → relative to the event target element
Call
What it does
event.pageY
Learn jQuery event.pageY: vertical mouse position relative to the document top edge, official mousemove demo with pageX, pageY vs clientY, click coordinates, examples, pitfalls, and FAQs.
Load jQuery before your script (CDN or local file), then wrap DOM work in $(function () { ... }) when needed.
Parameters
Parameter
Description
Step 1
Choose a mouse event (mousemove, click, mousedown, …).
Step 2
Bind with .on("mousemove", handler) (or click / mousedown).
Step 3
Inside the handler, read event.pageY — pixels from the document’s top edge.
Return Value
Return Value
Description
Value / undefined
Getters usually return a value from the first matched element, or undefined when nothing applies.
jQuery Examples
Example 1 — Official Demo: Log pageX / pageY
On mousemove, show both document coordinates (official idea).
Scroll. When scrollY > 0, pageY is larger than clientY.
Frequently Asked Questions
event.pageY is a Number on the jQuery event object. It is the mouse pointer’s vertical position in pixels relative to the top edge of the document — including any vertical scroll. Available since jQuery 1.0.4 on mouse events such as mousemove, click, and mousedown.
clientY is relative to the browser viewport (visible window). pageY includes document scroll — roughly pageY ≈ clientY + window.scrollY. Use pageY for document-wide coordinates; clientY for viewport-fixed UI.
pageY is vertical (from the document’s top edge). pageX is horizontal (from the document’s left edge). Together they form a (x, y) point in document space — the official jQuery demo logs both on mousemove.
Mouse events expose pageY — mousemove, mouseenter, mouseleave, mouseover, mouseout, mousedown, mouseup, and click. Keyboard events do not carry a meaningful pointer pageY.
No. pageY is read-only — the browser sets it from the pointer when the event fires. Read pageY and apply it to your own variables or element positions.
pageY is relative to the entire document. offsetY is relative to the event target’s padding edge. Use pageY for absolute document positioning; offsetY for clicks inside a specific box.