The jQuery event.pageX can be used to find the mouse position relative to the left edge of the document, whereas the event.pageY can be used to find the mouse position relative to the top edge of the document. Let's check out an example to understand how it works:
Use the jQuery
event.pageX
andevent.pageY
The jQuery
need an explanation for this answer? contact us directly to get an explanation for this answerevent.pageX
can be used to find the mouse position relative to the left edge of the document, whereas theevent.pageY
can be used to find the mouse position relative to the top edge of the document. Let's check out an example to understand how it works: