<!DOCTYPE html>
<html>
<head>
<title>jQuery click() method</title>
<script src="jquery-latest.min.js"></script>
<script>
$(document).ready(function(){
$("button").click(function(){
$("p").click();
});
$("p").click(function(){
$("span").fadeIn(500);
$("span").fadeOut(500);
});
});
</script>
<style>
span {
display: none;
color: red;
}
p {
cursor: pointer;
}
</style>
</head>
<body>
<div>
<button class="btn1">Click event</button>
<br />
<p>first paragraph text</p>
</div>
<span style="">Paragraph clicked</span>
</body>
</html>