Suppose I have an element look likes
<div class="amy mary peter john tom">abc</div>
I will use the jQuery to get the class name
var classname = $(div).attr('class');
Since the result is "amy mary peter john tom", how can I convert this string to array?
Somethings likes var classname = ["amy", "mary", "peter", "john", "tom"];
Thanks