views:

44

answers:

1

I wish to get the number of all TR elements that have a input element in them somewhere. How should I proceed ?

Html :

<tbody> <tr> <td>Ignore this item 1</td> </tr> <tr> <td>Ignore this item 2</td> </tr> <tr> <td><input blablabla>... Include this TR...</td> </tr> </tbody>

Thanks!

+4  A: 

$('tr:has(input)').length

tvanfosson
you're so awesome @tv
Pointy