How can I count children <li>
within a <ul>
?
I want to hide last <li>
if <ul>
is have less than or equals to 6 <li>
's in one <ul>
.
CODE
<ul>
<li>one</li>
<li>Two</li>
<li>Three</li>
<li>Four</li>
<li>Five</li>
<li class="more"><span>Hide this if only 6 li's are there in this ul</span></li>
</ul>