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

List browser related issues for jquery?

603


What are the the two types of cdns?

648


Explain .empty() vs .remove() vs .detach().

684


What is the minimum setup needed to start using jquery.

660


Which version of jquery file should be used?

679


Explain each() function in jquery?

5114


Why we use chaining in jquery?

652


What are the advantages of method chaining in jquery?

639


What is event preventdefault () and event stoppropagation () in jquery?

581


What is the use of serialize method in jQuery?

635


What is method chaining in jquery and what are the advantages?

585


Tell me what does dollar sign ($) means in jquery? : jquery mobile

630


How can we apply css in last child of parent using jquery library?

668


Explain event.preventdefault? : jquery mobile

649


Tell me how to write browser specific code using jquery? : jquery mobile

605