How to use jQuery pageX() Method event property

This article describe about jQuery Event pageX() Property.
  • 2355

jQuery Event pageX() Property

The pageX() property define the position of mouse pointer, to the left edge of the document.




Parameter Description
Event Required. It define the event to use. The event parameter comes from event bind method


<!DOCTYPE html>



<script type="text/javascript" src="jquery.js"></script>

<script type="text/javascript">

    $(document).ready(function () {

        $(document).mousemove(function (e) {

            $("span").text("X: " + e.pageX + ", Y: " + e.pageY);






<p>The mouse pointer is at: <span></span></p>






pageX property pic18.jpg

Note: Here X and Y indicate the coordination of mouse, if you move the mouse on the browser then the value of X and Y will be change.

You may also want to read these related articles Click here

Ask Your Question 

Got a programming related question? You may want to post your question here

Programming Answers here


More Articles

© 2020 DotNetHeaven. All rights reserved.