In jQuery, how to select ALL the TR that only has 2 TD inside?
Here’s the sample:
<table>
<tr>
<td></td>
</tr>
<tr> /* I only want to select this. */
<td></td>
<td></td>
</tr>
<tr>
<td></td>
</tr>
</table>
You should use the
.filter()method to reduce thetrto only those whose children count is 2Demo at http://jsfiddle.net/gaby/xTNcG/