Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 239
  • Last Modified:

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
0
badwolfff
Asked:
badwolfff
  • 2
1 Solution
 
badwolfffAuthor Commented:
I managed myself.

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

Open in new window

0
 
badwolfffAuthor Commented:
I managed by myself
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now