Onclick function not working on inserted HTML
<p>Im just new to jquery and while doing experimentations on jquery I encountered this problem -> It can insert the html to the div but the click function in not working on the inserted html. Anyone knows why? thanks in advance</p>

<pre><code>$(document).ready(function(){
$("#insertTest").click(function(){
$("#testDiv").html($("#testDiv").html() + '&lt;p&gt;&lt;a href="#" class="testClick"&gt;Click  Me&lt;/a&gt;&lt;/p&gt;');
});

$(".testClick").click(function(){
alert('Ahoy');
});

});

&lt;a href="#" id="insertTest"&gt;Click to Insert&lt;/a&gt;
&lt;div id="testDiv"&gt;
&lt;/div&gt;
</code></pre>
