count li elements jquery 1

count li elements jquery

$("#mylist li").length

Here is what the above code is Doing:
1. Select the element with the id of mylist.
2. Find all the li elements inside that element.
3. Get the length of the resulting array.

Similar Posts