You need to pass the index tr, which requires the data attribute from
$('#tableid tr:eq(0)'); // The first row in the table
$('#tableid tr:eq(1)'); // The second row in the table
Since the table may have several rows
var theRowId = $('#tableid tr:eq(1)').attr('data-id');
OR if you know the row id .. just do it
$('#tableid tr[data-id="'+theRowId+'"]').remove();
source share