Home >>jQuery Tutorial >jQuery event.pageY() Property

jQuery event.pageY() Property

jQuery event.pageY Property

jQuery event.pageY Property in jQuery is used to returns the position of the mouse pointer which is relative of the document to the top edge.

Syntax:

event.pageY()

Parameter Values

Parameter Description
event It is a required parameter and is used to specify the event parameter comes from the event binding function

Here is an Example of jQuery event.pageY Property:


<html>
<head>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>
<script>
$(document).ready(function(){
$(document).mousemove(function(event){ 
$(".PageY").text("X: " + event.pageX + ", Y: " + event.pageY); 
});
});
</script>
</head>
<body>
<p> mouse pointer position is : <span class="PageY"></span></p>
</body>
</html>

Output:

mouse pointer position is :


No Sidebar ads