<html> <head> <script type="text/javascript" src="jquery-1.6.2.js"></script> <script type="text/javascript"> $(function() { alert($('.test :hidden').length); //read in sequence, first .test then :hidden alert($('.test:hidden').length); //read simultaneously, .test && :hidden }); </script> </head> <body> <div class="test"> <div style="display:none">aaa</div> <div style="display:none">bbb</div> <div style="display:none">vvv</div> <div class="test" style="display:none">ddd</div> </div> <div style="display:none">eee</div> <div style="display:none">fff</div> </body> </html>
alert($('.test:hidden').length);
It is possible to read this from the end. the hidden and class name test element