The example in this article describes the usage of the size() method in jQuery. Share it with everyone for your reference. The specific analysis is as follows:
This method can return the number of elements in the jQuery object collection.
The return value of the size() method is consistent with the length property of the jQuery object.
Grammar structure:
Example code:
The above code can calculate the number of li elements and output it.
I hope this article will be helpful to everyone’s jquery programming design.