How to get the Number of Controls Count using jQuery.

 Posted by vishalneeraj-24503 on 2/3/2015 | Category: jQuery Interview questions | Views: 427 | Points: 40

jQuery has Length property through which we can find the number of controls
Suppose,we have following HTML structure as shown below:-
<div id = div_1" class = "class1">

<div id = div_2" class = "class2">container 1</div>
<div id = div_3" class = "class2">container 2</div>

Output:- 1
Output:- 2

Asked In: Many Interviews | Alert Moderator 

Comments or Responses

Login to post response