title: How can I get the <span> elements which have a specific class name in jQuery?
body: <p>Using jQuery 1.9.1 and HTML5, I want to capture the elements which have only specific class names.</p>
  
  <p>Let's say I have the following HTML code:</p>
  
  <pre><code>&lt;div&gt;
       &lt;span class="req"&gt;A&lt;/span&gt;
       &lt;span class="req notreq"&gt;B&lt;/span&gt;
       &lt;span class="req notreq"&gt;C&lt;/span&gt;
       &lt;span class="req"&gt;D&lt;/span&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>I want to capture only the <code>&lt;span&gt;</code> elements with class <code>req</code> i.e. the values A and D.</p>
  
  <p>Using jQuery, I can capture all the values using <code>console.log($('.req'));</code> and all the <code>notreq</code> values using <code>console.log($('span.req.notreq'))</code></p>
  
  <p>I need only <code>req</code> values. Any help?</p>