Examine The Cursor Position on Screen in Jquery

Date Published: 10/05/2020 Published By: JaiSchool

<!DOCTYPE html>
  <title>Jquery height()</title>
  <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>

<h2 id="position" align="center">Right Click To Know The Cursor Position</h2>


    var name = $(this).attr("name");
    var top = e.pageY;
    var left = e.pageX
    $("#position").html("<font color='red' size='20'>Position from top: "+top+"px and left: "+left+"px</font");



Publish A Comment

Leave a Reply

Your email address will not be published.