Now, suppose you need to detect the current mouse coordinates in the web browser in use. To do this, you can write the following piece of code:
$(document).ready(function() {
$().mousemove(function(e)
{
$('# MouseCoordinates ').html("X Axis Position = " + e.pageX + " and Y Axis Position = " + e.pageY);
});
});