latest Post

jQuery Tip: How to get mouse cursor position

jQuery Tip: How to get mouse cursor position

Below jQuery code block will provide X and Y position of mouse cursor.
$(document).ready(function(){
  $(document).mousemove(function(e){
     $('#spnCursor').html("X Axis : " + e.pageX + " Y Axis : " + e.pageY);
  });
});

About Mallikarjun A

Mallikarjun A
Recommended Posts × +

0 comments:

Post a Comment