title: jquery abstractly adding up values of parent div's data values
body: <p>So I have several divs with the class "answers_total", and contained in it are five divs with a class "answer" and a data-answer attribute.  </p>
  
  <p>What I'm trying to do is somehow abstractly add up the total true values for each "answers_total" div and store them in a variable.  So for the first one here there are three "true" and in the second only two "true".  I'd need to be able to access each individual total, probably each have their own variable?  I'm not 100 percent sure.</p>
  
  <p>I think you'd do this with $(".answers_total").each...</p>
  
  <p>but I'm not sure where to go after that.  Any ideas on how to do something like this?  Maybe it's not possible or there is a better way to set up and do this?  </p>
  
  <p>Thanks so much for any help</p>
  
  <pre><code>&lt;div class="answers_total"&gt;
      &lt;div data-answer="true" class="answer"&gt;SPEECH&lt;/div&gt;
      &lt;div data-answer="false" class="answer"&gt;RELIGION AND BELIEF&lt;/div&gt;
      &lt;div data-answer="true" class="answer"&gt;PRESS&lt;/div&gt;
      &lt;div data-answer="true" class="answer"&gt;ASSEMBLY&lt;/div&gt;
      &lt;div data-answer="false" class="answer"&gt;PETITION&lt;/div&gt;
  &lt;/div&gt;
  &lt;div class="answers_total"&gt;
      &lt;div data-answer="false" class="answer"&gt;SPEECH&lt;/div&gt;
      &lt;div data-answer="true" class="answer"&gt;RELIGION AND BELIEF&lt;/div&gt;
      &lt;div data-answer="false" class="answer"&gt;PRESS&lt;/div&gt;
      &lt;div data-answer="true" class="answer"&gt;ASSEMBLY&lt;/div&gt;
      &lt;div data-answer="false" class="answer"&gt;PETITION&lt;/div&gt;
  &lt;/div&gt;
  </code></pre>