title: Find Length of Div
body: <p>How to find No. of Elements Present in div?? also  i want to print list of Element present in div . 
  I have tried this but it is not working ..</p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html&gt;
  &lt;head&gt;
  &lt;title&gt; Div Length&lt;/title&gt;
  &lt;script type="text/javascript" src="js/jquery-1.6.2.min.js"&gt;
  
  &lt;/script&gt;
  &lt;script&gt;
      $(function ()
      {
      alert(' Elements are ' +$('#main').length);
  
      }
      )
  &lt;/script&gt; 
  &lt;/head&gt; 
  &lt;body&gt;
  
  &lt;div id="main"&gt;
  
  &lt;img src="images/thumb1.jpg"; height="30" width="30" /&gt;
  &lt;img src="images/thumb2.jpg"; height="30" width="30"/&gt;
  &lt;img src="images/thumb3.jpg"; height="30" width="30"/&gt;
  &lt;img src="images/thumb4.jpg"; height="30" width="30"/&gt;
  &lt;div id="main1"&gt;
  
  &lt;/div&gt;
  
  &lt;div id="main2"&gt;
  
  &lt;/div&gt;
  
  
  &lt;/div&gt;
  &lt;/body&gt; 
  &lt;/html&gt;
  </code></pre>
  
  <p>I need to find length because i am dynamical adding element in div from j query so at the end i want to check what are all elements that has been added successfully .</p>
  
  <p>Thanks,</p>