I have a table having id agenda_tbl
which is in the form of ajax response. The row of this table are created from while loop.
<table id="agenda_tbl">
<thead>......</thead>
<tbody>
<tr>
<td>Data1</td>
<td>Data2</td>
<td>Data3</td>
<td>Data3</td>
<td><input type="button" class="approve_btn"</td>
</tr>
<tr>
.........
</tr>
</table>
CSS for the above table
#agenda_tbl
{
margin-top:5px;
border-collapse: collapse;
font-size: 12px;
}
#agenda_tbl td
{
border:1px solid black;
padding:3px;
}
I have written click event for the button in the first page.When I click the button,I need to hide the current row completely.I have done this with following jquery.
$(document).on('click','.approve_btn',function(e)
{
var element = $(this);
if(confirm('Do you approve this agenda?'))
{
element.closest('tr').remove();
//this hides the current row.Also used hide(),made html() of row
//to empty.But doesnt work
}
});
This script works properly for me,but the border for the adjacent rows are missing.I have googled a lot,but couldn't found a solution.
Screen shot1
After clicking approve button of any row,adjacent rows lost their border.