Difference between size and length of jQuery

event.preventDefault() and return false

jQuery .size() and .length both return the number of elements in the jQuery object.

Size() and length in jQuery both returns the number of element in an object but length is faster than the size because length is a property and size is a method and length property does not have the overhead of a function call.

Leave a Reply

Your email address will not be published. Required fields are marked *