title: Looping through each li and summing the values inside of a child div
body: <p>I need to loop through each li element and sum the text inside of a child div element with a class of '.listTotalPrice'.</p>
  
  <pre><code>&lt;ul id='shoppingList'&gt;
      &lt;li&gt;
          &lt;div class='.listTotalPrice'&gt;$ 598.00&lt;/div&gt;
      &lt;/li&gt;
      &lt;li&gt;
          &lt;div class='.listTotalPrice'&gt;$ 1,233.30&lt;/div
      &lt;/li&gt;
  &lt;/ul
  </code></pre>
  
  <p>Here is my function. 2 problems: 1) It's basically multiplying the value in the first li by the number of list items rather than summing each list item. 2) Any value with a comma, such as 1,200 - it's reading as a 1 instead of 1200. 22,000 would be runderstood as 22, etc. </p>
  
  <pre><code>function totalList(){
      var subTotal = 0;
  
      $( "#shoppingList li" ).each(function(){
          var liTotal = $('.listTotalPrice').text();
          liTotal = liTotal.replace('$ ', '');
          subTotal += parseInt(liTotal);
      });
      alert(subTotal);
  };
  </code></pre>