The direct children of some element that are hidden:
$('#someElement > :hidden').length;
Any descendants of some element that are hidden:
$('#someElement :hidden').length;
If you already have a jQuery object, you can use it as a context:
var ele = $('#someElement'); $(':hidden', ele).length;
Keith source share