How to use jquery to remove <div> in a table?
- by Pentatonic
I'm trying to remove a few rows surrounded by a div, but it doesn't work, why?
$(function(){
$("#div1").empty();
});
<table id="tbl" border="1px">
<thead>
...
</thead>
<tbody id="tblBody">
<div id="div1">
<tr id="tr1">
<td>
row1
</td>
</tr>
<tr>
<td>
row2
</td>
</tr>
</div>
</tbody>
</table>