Jquery and click event
<p>I have the following code, the elements are added to the page, but unusually the click event never fires. Any ideas?</p>

<pre><code>function ToggleData(e){
 var parentRow = $(this).parent().parent();
 var rowData = $(':nth-child(2)',parentRow);
 var html = $("&lt;input type='text' id='amendedval' value='" + $.trim(rowData.text()) +"'/&gt;");
 //Add the update tick
 var imgTick = $("&lt;img src='../images/tick.png' id='imgTick'/&gt;");
 rowData.text('');
 rowData.append(html);
 rowData.append(imgTick);
 imgTick.click(updateTickClick);
};

function updateTickClick(e)
{
 alert('hi');
};
</code></pre>

<p>Thanks.</p>
