Nov 19, 2014

Detect Current Mouse Coordinates Using JQuery

Below jQuery code block will provide X and Y position of mouse cursor.

<script>
$( document ).on( "mousemove", function( event ) {
$( "#log" ).text( "pageX: " + event.pageX + ", pageY: " + event.pageY );
});
</script>

Copy Paste This Code Below And Simply Do What Ever Your Planning To Do With It

<!doctype html>
<html lang="en">
<head>
  <meta charset="utf-8">
  <title>Mouse Pointer Tracker</title>
  
  <script src="http://code.jquery.com/jquery-1.10.2.js"></script>
<script>
 $( document ).on( "mousemove", function( event ) {
  $( "#log" ).text( "pageX: " + event.pageX + ", pageY: " + event.pageY );
});
</script>
</head>
<body>

<div id="log"></div>

</body>
</html>

No comments:

JWT Token Decode Using Jquery

When it come to authentication we use many mechanism. Ones the user authenticated we must keep these details somewhere safe. So we can share...