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