title: jQuery: get each element's width and sum them up
body: <p>How can I get each element's width and sum them up?</p>
  
  <p>For instance, here is the HTML:</p>
  
  <pre><code>&lt;div id="container"&gt;
  &lt;div class="block-item" style="width:10px"&gt;&lt;/div&gt;
  &lt;div class="block-item" style="width:50px"&gt;&lt;/div&gt;
  &lt;div class="block-item" style="width:90px"&gt;&lt;/div&gt;
  &lt;div&gt;
  </code></pre>
  
  <p>I can think of looping through each element, but how do I sum the numbers up?</p>
  
  <pre><code>$('.block-item').each(function(index) {
      alert($(this).width());
  });
  </code></pre>
  
  <p>I want to get the total number of <code>150 (10 + 50 + 90)</code>.</p>
  
  <p>Thanks.</p>