Preamble: I'm Italian, sorry for my bad English.
So this is the question:
considering an HTML object like this:
<div id="myDiv" class="c1 c2 c3 c4 c5"></div>
how can I get an array of strings, using jquery, from the "class" attribute of the "div" element?
Example:
var a = $('#myDiv').getClassArray(); //Not working,just an example
return a; //[c1,c2,c3,c4,c5]
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.