I have a simple HTML Table and it has a HTML button underneath it as shown below.
<h2>HTML Table</h2>
<table>
<tr>
<th>Company</th>
<th>Contact</th>
<th>Country</th>
</tr>
<tr>
<td>A</td>
<td>Maria Anders</td>
<td>Germany</td>
</tr>
<tr>
<td>A</td>
<td>Francisco Chang</td>
<td>Mexico</td>
</tr>
<tr>
<td>B</td>
<td>Roland Mendel</td>
<td>Austria</td>
</tr>
<tr>
<td>B</td>
<td>Helen Bennett</td>
<td>UK</td>
</tr>
<tr>
<td>C</td>
<td>Yoshi Tannamuri</td>
<td>Canada</td>
</tr>
<tr>
<td>C</td>
<td>Giovanni Rovelli</td>
<td>Italy</td>
</tr>
</table>
<button type="button">Hide A</button>
Is it possible to do hide all rows that belong to Company A when I click on that button ?
I know I can hide elements using $(selector).hide() but I am not sure how I can select/hide only certain rows based on some value ?