Created
June 16, 2013 04:11
-
-
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 :)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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