Possible Duplicate:
Find text string using jQuery?
How do you find a text string and hide it with jquery.
<div class="report-box">
<div class="title">test</div>
<table>
<tbody>
<tr align="center" class="CellLabel">
<td colspan="2">Day at a Glance</td>
</tr>
<tr class="CellLabel">
<td>New Clients</td>
<td>00000</td>
</tr>
<tr class="CellLabel">
< td>Money Received</td>
<td>$ 0000,000.0000</td>
</tr>
<tr class="CellLabel">
<td>Overdue Invoices</td>
<td>0000000</td>
</tr>
<tr class="CellLabel">
<td>Services</td>
<td>000000</td>
</tr>
<tr align="right" class="CellLabel">
<td colspan="2"></td>
</tr>
</tbody>
</table>
</div>
How would I remove
<tr class="CellLabel">
<td>Money Received</td>
<td>$ 0000,000.0000</td>
</tr>
from the code using a jquery.
First off, your html is a bit messy, lacks a few tags. But here you go. ;)
Preview - http://jsfiddle.net/Xpc63/1/
$('.CellLabel').removeByContent('Money');
See preview for full JS code.
Preview - http://jsfiddle.net/ahzPs/1/
$('.CellLabel').contains('Money').remove();
See preview for full JS code.
Preview - http://jsfiddle.net/mWtzw/
$('.CellLabel').filter(function() {
return $(this).html().indexOf('Money') != -1;
}).remove();
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With