How can I find number of none hidden rows, Here is the html
<div style="display:none;">
<ul id="abc">
<li>List Item</li>
<li>List Item</li>
<li style="display:none;">List Item</li>
<li class="hidden">List Item Hidden</li>
</ul>
</div>
CSS
ul { border: 1px solid blue; padding: 2px; margin: 2px;}
li { width: 100px; height:100px; background-color:blue;}
.hidden { display: none; }
jQuery
$(function () {
alert($("#abc li:not(:hidden)").length);
});
EDIT
The Code works as expected but what I want is
Finding Number of hidden List Items within a hidden Div...
Note: it's a pop-up list, I am using some code to .hide() and .show() li but while list has display:none; I still want to find out how many items are visible, as if it's zero, i would hide the button that opens this pop-up list
EDIT------------------------------------------2
FORGET EVERYTHING...
I want to find out number of not hidden list items that will become visible if Div they are in becomes visible.
Simple as milk now :-)