.size()Returns: Integerversion deprecated: 1.8, removed: 3.0
Description: Return the number of elements in the jQuery object.
.length
property instead.
.size()
method is functionally equivalent to the .length
property; however, the .length
property is preferred because it does not have the overhead of a function call.
1
2
3
4
|
|
.size()
and .length
identify the number of items:
1
2
|
|
Example:
1
2
3
4
5
6
7
8
9
|
|