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

What is each() function in jQuery? How do you use it?

600


How to give face effect in jquery?

616


What is the difference between find and children methods?

653


Explain the difference between .empty() and .remove() ?

587


How we can hide a block of html code on a button click using jquery?

616


What is jquery.size()? : jquery mobile

624


What is $() in jquery library?

660


How to increase cursor size in html body using jquery?

562


Why jQuery is needed?

661


How do you select an item using css class or id and get the value by use of jquery.

623


How can we include jQuery library in ASP.Net project?

638


How can I select 20th div with jquery?

629


How can we apply css in div using jquery?

678


How we can set the html contents of an element in jquery?

638


With jquery which operating system is more compatible?

671