If you are using jQuery 1.7 or later, you need to use a real-time event handler, as subsequent pages are added dynamically.
$('#example tbody td.delete').live('click', function(event) { var row = $(this).closest('tr').get(0); oTable.fnDeleteRow( row ); });
jQuery.live ()
EDIT:
It seems that people are still using this answer, so to update it with the latest best practices, DO NOT use , use .live (). Live was deprecated at 1.7 and removed at 1.9 . Use the .on () handler instead . This can handle delegated events by binding the event to the parent and using the actual element you want to target as an optional selection parameter. To use it in the above example, it would look like this:
$('#example tbody').on('click', 'td.delete', function(event) { var row = $(this).closest('tr').get(0); oTable.fnDeleteRow( row ); });
source share