What is the difference between jquery.size() and jquery.length?

Answer Posted / chaitanya

jQuery .size() method returns number of element in the object. But it is not preferred to use the size() method as jQuery provide .length property and which does the same thing. But the .length property is preferred because it does not have the overhead of a function call.

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How to select combobox select value and text using jquery?

435


What is a cdn? What are the advantages of using cdn?

408


What are the advantage of using minimized version of jquery?

430


Why we need jquery mobile? : jquery mobile

462


What is the difference between prop and attr?

433






What is the difference between onclick and onsubmit?

473


Difference between document.ready() and body onload()?

481


What is the use of jquery.data()?

475


What are the types of selectors that are used in jquery? Give examples.

479


What are the features of jquery used in web applications?

480


differentiate between bind() vs live() vs delegate() methods in jquery.

438


Can we have multiple document.ready() function on the same page? : jquery mobile

402


Can you please explain the difference between event.preventdefault and "return false"? : jquery mobile

469


What are the effects methods used in jquery?

438


How to add and remove css classes to an element using jquery?

439