私は変更できないこのテーブル構造を持っています:
<table class="sui-opt-in">
<tbody>
<tr>
<th></th>
<th><strong>Time</strong>
</th>
<th><strong>Cost</strong>
</th>
</tr>
<tr style="display: none;" id="labor_summary_for_1">
<td> <a href="#" onclick="jQuery('#labor_for_1').show(); jQuery('#labor_summary_for_1').hide(); return false;">
<i class="icon-right "></i>
Name Here
</a>
</td>
<td>1m</td>
<td>£0.75</td>
</tr>
</tbody>
<tbody id="labor_for_1" style="display: table-row-group;">
<tr>
<td> <a href="#" onclick="jQuery('#labor_summary_for_1').show(); jQuery('#labor_for_1').hide(); return false;">
<i class="icon-down "></i>
Name Here
</a>
</td>
<td></td>
<td></td>
</tr>
<tr>
<td></td>
<td>1m</td>
<td>£0.75 <a href="#" onclick="new Ajax.Request('/tickets/remove_time_spent/1247', {asynchronous:true, evalScripts:true, method:'delete', parameters:'work_id=456&selected_view=my_tickets' + '&authenticity_token=' + encodeURIComponent('7hd72GGlOMJINFvnvio5c6z0CTtRyxNUdU8uMJrKhps=')}); return false;"><i class="icon-remove "></i></a>
</td>
</tr>
</tbody>
<tfoot>
<tr>
<td><strong>Total</strong>
</td>
<td><strong>1m</strong>
</td>
<td><strong>£0.75</strong>
</td>
</tr>
</tfoot>
</table>
次に、この jQuery を使用して、最後のテーブル セルを削除します。
jQuery("#labor-section .sui-opt-in th:last-child, #labor-section .sui-opt-in td:last-child").remove();
しかし、最後のセルに a href を保持したいだけではありません(価格を削除します)。
助言がありますか?
ありがとう。