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