Is there a jQuery function that counts how many elements are in a certain element? For example, I want to count how many
<li /> tags are in a certain
<ul /> list.
Ahhh, nevermind. I think I got it. Sorry for the useless thread.
I believe this would work:
and you’d of course replace ‘UL-ID’ with the ID of your unordered list.
Edit: Yeah .length() completely breaks all the scripts. .size() at least showed the right number until I pressed something.
You can use ”.length” or ”.size()” ... not ”.length()”