Hi I want to count LI which does not have the UL , for the first level only, but when I count this it shows size 4 instead of 2, its count the inner LI also.
&l
Not sure if I'm reading right, but ..
$('ul.first-level > li:not(:first)').length
Returns 2 for me (see demo)