title: jQuery .text() multiple elements same class
body: <p>I'm attempting to use .text() on multiple (unknown number of) elements on a page.</p>
  
  <p>Consider:</p>
  
  <pre><code>&lt;ul&gt;
      &lt;li class="myClass"&gt;element1&lt;/li&gt;
      &lt;li class="myClass"&gt;element2&lt;/li&gt;
      &lt;li class="myClass"&gt;element3&lt;/li&gt;
  &lt;/ul&gt;
  </code></pre>
  
  <pre class="lang-js prettyprint-override"><code>$('.myClass').text();
  </code></pre>
  
  <p>Will return the first element's text "element1". </p>
  
  <p>I came across the following while looking around:</p>
  
  <pre><code>$('.myClass').each(function(index, obj)
  {
     // do something
  });
  </code></pre>
  
  <p>However, this simply query returns each full elements like:</p>
  
  <pre><code>&lt;li class="myClass"&gt;element1&lt;/li&gt;
  &lt;li class="myClass"&gt;element2&lt;/li&gt;
  &lt;li class="myClass"&gt;element3&lt;/li&gt;
  </code></pre>
  
  <p>I need to return all element's text such as:</p>
  
  <p>"element1"
  "element2"
  "element3"</p>
  
  <p>Thanks!</p>