Remove Table Row
Remove the table row that is dynamically generated.
HTML
<table class="table">
<thead>
<tr>
<td>Sno</td>
<td>User Name</td>
</tr>
</thead>
<tbody></tbody>
</table>
<button class="append-value">Populate Values</button>
JavaScript
$(function () {
var table = $(".table tbody");
$(".append-value").click(function () {
//table.find("tr:has(td)").remove();
//$("tr:has(td)").remove();
var trhtml = "<tr><td>001</td><td>TEST</td></tr>";
table.html(trhtml);
});
});
/*http://stackoverflow.com/questions/6942828/how-to-remove-table-rows-and-append-other-rows-via-ajax-call */