title: How do I check with jQuery if an element has at least one class, from a list of specified classes?
body: <p>Example html:</p>
  
  <pre><code>&lt;div class="red"&gt;&lt;/div&gt;
  &lt;div class="green"&gt;&lt;/div&gt;
  &lt;div class="blue"&gt;&lt;/div&gt;
  
  &lt;div class="apple"&gt;&lt;/div&gt;
  </code></pre>
  
  <p>I want to loop through the divs and filter them out if they don't have a class of either 'red', 'green', or 'blue'.</p>
  
  <p><code>var onlyColorDivs = $('div').hasClass( __________ );</code></p>
  
  <p>Is there a way to filling the blank in the previous line to accomplish this. Or am I going to have to put my list color classes in an array and do a loop?</p>
  
  <p>Let me know if any clarification is needed.</p>