Quantcast
Viewing latest article 13
Browse Latest Browse All 124

fnDeleteRow with jQuery

Into the last cell on a table with datatables i use icons for some actions. One of them are a delete-icon, with this the data into this row will delete with ajax. Now i'd like to delete the row also from datatable and i try it to do so:
[code]var row = $(this).closest('tr');
$('.dataTable').dataTable().fnDeleteRow(row);[/code]

But this will delete the wrong row into the table. The datatable object will create in another function and i don't have it globally.
How can i delete the correct row?

Thanks,
Stefan

Viewing latest article 13
Browse Latest Browse All 124

Trending Articles