Handle click event
Description
The following code shows how to handle click event.
Example
<html>
<head>
<script
src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<script type="text/javascript">
$(document).ready(function() {<!-- w ww.j a va 2 s .c om-->
$("div").live("click", function() {
$(this).after("<p>Another paragraph!</p>");
});
});
</script>
</head>
<body>
<div>
<h1>java 2s.com</h1>
</div>
</body>
</html>