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.
You should try this one:
$("selector").prop("classList")
It returns an array of all current classes of the element.