Looking to Build/Redesign a Website or Blog ?

To speak to Rakshit, call +91 968 704 2303

How to Identify or Track Mouse Position using jQuery

Hello Friends,

I was working with one application for one of my client where I need to track or identify the mouse position in pixel using jQuery. Using this mouse positions you can drag your object or any other operation you want to do. I came across mouse move event of jQuery which gives you the position of X and Y from top left corner of page. Look at below syntax. This might be useful to you in future needs.

$().mousemove(function(e){
// e.pageX – gives you X position
// e.pageY – gives you Y position
});

That’s it. Let me know if you find any problem.

Thank you!

Share:

No Comments Yet.

Leave a Reply

Your email address will not be published.