Is there a way in jQuery to loop through or assign to an array all of the classes that are assigned to an element?
ex.
var classList = $(element).attr('class').split(/\s+/); $(classList).each(function(index){ //do something });