Answers for "how to get postion of page where i click in jquery"

0

how to get postion of page where i click in jquery

<!doctype html>
<html lang="en">
<head>
  <meta charset="utf-8">
  <title>position demo</title>
  <style>
 
  </style>
  <script src="https://code.jquery.com/jquery-3.5.0.js"></script>
</head>
<body>
 
<div>
  <p>Hello</p>
</div>
<p></p>
 
<script>
var p = $( "p" ).first();
var position = p.position();
$( "p" ).last().text( "left: " + position.left + ", top: " + position.top );
</script>
 
</body>
</html>
Posted by: Guest on March-11-2021

Code answers related to "how to get postion of page where i click in jquery"

Code answers related to "Javascript"

Browse Popular Code Answers by Language