<!DOCTYPE html>
<html lang="en-US">
<head>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script> </head>
<body>
<h1>jQuery mousedown() Method</h1>
<p>Press Me.</p>
<button>Trigger mousedown Event</button>
<script>
$(document).ready(function(){
$("p").mousedown(function(){
alert("Paragraph is pressed.");
});
$("button").click(function(){
$("p").mousedown();
});
});
</script> </body>
</html>