When I click remove
button the data is removed but I can't remove the tr
that is shown in table.
<tr>
<td>name</td>
<td><button id="removebutton" data-id="?">Remove</button></td>
</tr>
I want to select tr
that is in the top and remove it from the ajax response.
I have tried:
$("#removebutton).on("click",function(){
success: function(res){
$(this).parents("tr").remove(); //this doesn't work
}
});