Syntax

Basic Example

In the following jQuery example, the event.pageX and event.pageY will be used to display the X and Y position of the mouse cursor. You can also get the pageX and pageY coordinates for a specific HTML element by making some simple changes to the jQuery code as follows.