Skip to content

Instantly share code, notes, and snippets.

@ijmorgado
Created June 16, 2013 04:11
Show Gist options
  • Save ijmorgado/5790723 to your computer and use it in GitHub Desktop.
Save ijmorgado/5790723 to your computer and use it in GitHub Desktop.
This is just one way to remove a row from a table wrapped with dataTable jquery plugin, wich is a litle bit rare because to do that we can't just remove the element from the Dom...we have also to remove it from the dataTable plugin to refresh the counters and the text around the table :)
var oTable = $("#whatever").dataTable({
// ....options here
});
// then we can do...
$(this).parents("TR").fadeOut("slow", function () {
var pos = oTable.fnGetPosition(this);
oTable.fnDeleteRow(pos);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment