New Row Is Added but table cell click event is not recognized
New Row Is Added but table cell click event is not recognized
First off - the product is fantastic! I do however have one little problem.
After adding a row to the table using a modal popup, I can delete the existing rows but not the new row. The following is an abbreviated snippet of the function used to delete a row.
$('#grid tbody td').click(function() {
...
oTable.fnDeleteRow(oTable.fnGetPosition(row));
...
}
The problem is that the new row is not 'trapped' using the above selector.
I would greatly appreciate any help I can get with this problem - I have a feeling it's something dumb that I'm missing.
Thanks.
After adding a row to the table using a modal popup, I can delete the existing rows but not the new row. The following is an abbreviated snippet of the function used to delete a row.
$('#grid tbody td').click(function() {
...
oTable.fnDeleteRow(oTable.fnGetPosition(row));
...
}
The problem is that the new row is not 'trapped' using the above selector.
I would greatly appreciate any help I can get with this problem - I have a feeling it's something dumb that I'm missing.
Thanks.
This discussion has been closed.
Replies
Instead of:
[code]
$('#grid tbody td').click(function()
[/code]
Use:
[code]
$('#grid tbody td').live("click", function()
[/code]
See if that helps.