title: jQuery span class selector
body: <p>I have a span with a text inside it like :</p>
  
  <pre><code>&lt;span class="characters-count"&gt;&amp;#40;160 Characters Left&amp;#41;&lt;/span&gt;
  </code></pre>
  
  <p>given the span a class in this case <code>.characters-count</code> , when i tried class selector using jQuery to get the text inside span :</p>
  
  <pre><code>$(".characters-count")[0].text();
  </code></pre>
  
  <p>it returns undefined !</p>
  
  <p>However this selector works well :</p>
  
  <pre><code>$("span.characters-count").text();
  </code></pre>
  
  <p>anyone can explain what is happening ?</p>