Being relatively new with jQuery I hope someone could point me in the right direction on how to best remove a certain table row.
Source:
<table>
<tr class="first">
<td class="first b b-posts"><a href='edit.php'>1</a></td>
<td class="t posts"><a href='edit.php'>Bericht</a></td>
</tr>
<tr>
<td class="first b b_pages"><a href='edit.php?post_type=page'>0</a></td>
<td class="t pages"><a href='edit.php?post_type=page'>Pagina's</a></td>
</tr>
<tr>
<td class="first b b-cats"><a href='edit-tags.php?taxonomy=category'>1</a></td>
<td class="t cats"><a href='edit-tags.php?taxonomy=category'>Categorie</a></td>
</tr>
<tr>
<td class="first b b-tags"><a href='edit-tags.php'>0</a></td>
<td class="t tags"><a href='edit-tags.php'>Trefwoorden</a></td>
</tr>
</table>
This being the bit I’d like to remove:
<tr>
<td class="first b b-tags"><a href='edit-tags.php'>0</a></td>
<td class="t tags"><a href='edit-tags.php'>Trefwoorden</a></td>
</tr>
I’ve tried using these next lines of code, which leaves me with an empty tr
jQuery(document).ready(function(a) {
a("tr td.b-tags").remove();
a("tr td.tags").remove();
});
You can use
eqbased on the row index you want to remove.Note that the index is zero-based.
So
eq(3)removes the fourth.Or based on child
tdclass.