I have the following code, the elements are added to the page, but unusually the click event never fires. Any ideas?
function ToggleData(e){
var parentRow = $(this).parent().parent();
var rowData = $(':nth-child(2)',parentRow);
var html = $("<input type='text' id='amendedval' value='" + $.trim(rowData.text()) +"'/>");
//Add the update tick
var imgTick = $("<img src='../images/tick.png' id='imgTick'/>");
rowData.text('');
rowData.append(html);
rowData.append(imgTick);
imgTick.click(updateTickClick);
};
function updateTickClick(e)
{
alert('hi');
};
Thanks.