title: Get the "class" attribute of an object split into an array of strings
body: <p>Preamble: I'm Italian, sorry for my bad English.</p>
  
  <p>So this is the question:</p>
  
  <p>considering an HTML object like this:</p>
  
  <pre><code>&lt;div id="myDiv" class="c1 c2 c3 c4 c5"&gt;&lt;/div&gt;
  </code></pre>
  
  <p>how can I get an array of strings, using jquery, from the "class" attribute of the "div" element?</p>
  
  <p>Example:</p>
  
  <pre><code>var a = $('#myDiv').getClassArray(); //Not working,just an example
  
  return a;  //[c1,c2,c3,c4,c5]
  </code></pre>
  
  <p>I thought I could read the "class" attribute and then split the string, but it seems too verbose, I wondered if there was a shorter and more elegant method.</p>