title: Query classnames of checked items as array?
body: <p>I have many checkboxes on a page, like this:</p>
  
  <pre><code>&lt;input type="checkbox"  id="cb_31" class="observedType1"&gt;
  &lt;input type="checkbox"  id="cb_32" class="observedType1" checked="checked"&gt;
  &lt;input type="checkbox"  id="cb_33" class="observedType1"&gt;
  &lt;input type="checkbox"  id="cb_40" class="observedType2" checked="checked"&gt;
  </code></pre>
  
  <p>I then wanted to retrieve the classes of all checked boxes in an array (ideally as a list of unique items), so I'm looking to for <code>['observedType1'l'observedType2'].</code><br>
  My best idea was: 
  <code>var clss=$("[class*='observedType']:checked").attr("class");</code> 
  but that only gives me a string "<code>observedType1</code>".</p>
  
  <p>How can I get the array I am looking for? (or a "list" to walk through in a loop)...</p>
  
  <p>There's also a <a href="https://jsfiddle.net/mbaas/27dc8kga/1/" rel="nofollow noreferrer">fiddle</a></p>