我有一个脚垫,我需要清理。我的意思是,我需要删除脚注中的所有行。是否有任何可行的功能来做到这一点?还是我需要一一删除行?
我试图这样做重新初始化表:
$('.footable').footable();
我也尝试过像这样在行之间进行迭代:
var footable = $('table').data('footable');
//This is the problem I don´t know how to get first row in the table.
var row = ??????.parents('tr:first');
var next=row.next();
for (var i=0; i<long-1; i++){
footable.removeRow(next);
next=row.next();
}
footable.removeRow(row);
还有我对应的html源代码:
<table class="footable footable-loaded">
<thead>
<tr>
<th>Cantidad</th>
<th>Producto</th>
<th>Precio</th>
<th>Eliminar</th>
</tr>
</thead>
<tbody>
</tbody>
<tfoot>
<tr>
<th></th>
<th>Total</th>
<th id="total">19.5</th>
<th></th>
</tr>
</tfoot>
</table>