How do I hide an element in jQuery based on it's child's contents?

Hi,

I have the following code that repeats on my site:
<tr class="alt">
<th>Aggregato</th>
<td>12/06/2014</td>
</tr>

Open in new window


This is autogenerated and is a row in a long table so I can't specify any id or class values to the <tr> or the <th>.
But the string <th>Aggregato</th> repeats in every instance.

I'd like to eliminate the entire <TR> whose first child <TH> contains the string "Aggregato"
How do I do this?

thanks in advance
badwolfffAsked:
Who is Participating?
 
badwolfffAuthor Commented:
I managed myself.

jQuery('th:contains(Aggregato)').parent().hide();

Open in new window

0
 
badwolfffAuthor Commented:
I managed by myself
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.