I am missing something here. When the row with the class one
is clicked, I want to find only the closest row with the class two
and then toggle (show/hide) it.
$(".one").on('click', function() {
$(this).find('.two').toggle();
});
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<table>
<tr class="one">
<td> Hello </td>
</tr>
<tr>
<td> world </td>
</tr>
<tr class="two">
<td> Foo </td>
</tr>
<tr class="two">
<td> Bar </td>
</tr>
</table>