
Untitled
By: a guest on
Aug 5th, 2012 | syntax:
None | size: 1.04 KB | hits: 11 | expires: Never
How to remove a tag from table by id
<table>
<tr>
<td>ID: 1</td>
<td align="left" width='20%'>
<div class='tools'>
<a href='http://localhost/www/GestIEFP/index.php/admin/groups/index/delete/1' title='Remover Grupo' class="delete-row" ><span class='delete-icon'></span></a>
<a href='http://localhost/www/GestIEFP/index.php/admin/groups/index/edit/1' title='Editar Grupo'><span class='edit-icon'></span></a>
<div class='clear'></div>
</div>
</td>
</tr>
</table>
$(function(){
$('table').find("td:contains('ID: 1')")
.each ( function () {
$('a').remove();
})
})
$(function(){
$('table').find("td:contains('ID: 1')")
.each ( function () {
$(this).next('td').find('a').remove();
})
});
$("table td:contains('ID: 1')").closest("tr").find("a").remove();
$("td:contains('ID: 1')").next().find('a').remove()