Open In App

jQuery event.pageY Property

Last Updated : 18 Nov, 2022
Improve
Improve
Like Article
Like
Save
Share
Report

The jQuery event.pageY is an inbuilt property that is used to find the position of the mouse pointer relative to the top edge of the document.

Syntax:

event.pageY

Parameter: It does not accept any parameter because it is a property not a function. 

jQuery examples to show the working of event.pageY property: 

Example 1: In the below code, bottom left position of the mouse-pointer is getting displayed. 

HTML




<!DOCTYPE html>
<html>
  
<head>
    <script src=
    </script>
  
    <script>
        < !--jQuery code to demonstrate the x - coordinate of mouse pointer-- >
            $(document).ready(function () {
                $(document).mousemove(function (event) {
                    $("span").text(event.pageY);
                });
            });
    </script>
</head>
  
<body>
    <!-- bottom left position of the pointer will show here -->
    <p>
        Y co-ordinate position of the mouse-pointer is : 
        <span></span>
    </p>
</body>
  
</html>


Output:

 

Example 2: In the below code, top left corner position of the mouse-pointer is getting displayed. 

HTML




<!DOCTYPE html>
<html>
  
<head>
    <script src=
    </script>
    
    <script>
        < !--jQuery code to demonstrate the mouse pointer position-- >
            $(document).ready(function () {
                $(document).mousemove(function (event) {
                    $("span").text(event.pageY);
                });
            });
    </script>
</head>
  
<body>
    <!-- top left position of the pointer will show here -->
    <p>
        Y co-ordinate position of the mouse-pointer is : 
        <span></span>
    </p>
</body>
  
</html>


Output:

 



Previous Article
Next Article

Similar Reads

HTML | DOM MouseEvent pageY Property
The MouseEvent pageY property is a read-only property and used for returning the vertical coordinate of the mouse pointer when an event has triggered. Syntax : event.pageY Return Value: It returns a number which represents the vertical coordinate of the mouse pointer in pixels. Below program illustrates the MouseEvent pageY property: Example: Findi
1 min read
jQuery event.timeStamp Property
The jQuery event.timeStamp is an inbuilt property that is used to measure the difference in milliseconds between the time of the event created by the browser and January 1, 1970. Syntax: event.timeStampParameter: It does not accept any parameter because it is a property, not a function. Example 1: This Example shows the working of an event.timeStam
2 min read
jQuery event.type Property
The jQuery event.type is an inbuilt property that is used to return which event type is started. Syntax: event.typeParameter: It does not accept any parameter because it is a property, not a function. Example 1: This example shows the working of an event.type property. C/C++ Code &lt;!DOCTYPE html&gt; &lt;html&gt; &lt;head&gt; &lt;script src=
2 min read
jQuery event.pageX Property
The jQuery event.pageX is an inbuilt property which is used to find the position of the mouse pointer relative to the left edge of the document. Syntax: event.pageX Parameter: It does not accept any parameter because it is a property not a function. jQuery examples to show the working of event.pageX property: Example 1: In the below code, top left
2 min read
jQuery event.which Property
The jQuery event.which is an inbuilt property in jQuery that is used to return which keyboard key or mouse button was pressed for the event. Syntax: event.whichParameter: It does not accept any parameter because it is a property, not a function. jQuery examples to show the working of this property:Example 1: In the below code, ascii value of the ke
2 min read
jQuery event.relatedTarget Property
The jQuery event.relatedTarget is an inbuilt property that is used to find which element is being entered or gets exit on mouse movement. Syntax: event.relatedTarget Parameter: It does not accept any parameter because it is a property not a function. Example 1: This example shows the working of event.relatedTarget property. C/C++ Code &lt;!DOCTYPE
2 min read
jQuery event.result Property
The jQuery event.result is an inbuilt property which is used to find the last and previous value returned by an event handler started by the specified event. Syntax: event.result Parameter: It does not accept any parameter because it is a property not a function. Example 1: jQuery code to show the working of event.result property. C/C++ Code &lt;!D
2 min read
jQuery event.target Property
The jQuery event.target is an inbuilt property that, is used to find which DOM element will start the event. Syntax: event.targetParameter: It does not accept any parameter because it is a property, not a function. Example 1: This example shows the working of event.target Property. C/C++ Code &lt;!DOCTYPE html&gt; &lt;html&gt; &lt;head&gt; &lt;styl
2 min read
jQuery event.namespace Property
The jQuery event.namespace property is used to return the custom namespace whenever the event is triggered. It is used to handle tasks differently depending on the namespace used. Syntax: event.namespace Parameters: This property contains single parameter event which is required. It returns the custom namespace and it comes from the event binding f
2 min read
jQuery event.metaKey Property
The event.metaKey property in jQuery is used to identify whether the meta key is pressed or not. There are two examples discussed below. Syntax: event.metaKey Return Value: It returns "true" if the key is meta key else it returns "false". Example 1: In this example, type in the &lt;input&gt; element and see the result. &lt;!DOCTYPE HTML&gt; &lt;htm
2 min read