Back to Tutorial Paste Your Code here! <!DOCTYPE html> <html> <head> <title>The position Method</title> <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"> </script> <script> $(document).ready(function(){ $("button").click(function(){ var x = $("p").position(); alert("Top position: " + x.top); }); }); </script> <style> div { font-weight: bold; padding:20px; font-size: 30px; border: 3px solid red; width: 300px; height: 150px; } </style> </head> <body> <div> <p>Experts PHP Examples.</p> <button>Click Here!</button> </div> </body> </html> Output