|
I need to verify if a class has been added to a certain element without knowing which... How can I get the last class setted on a DOM element? |
|
In jQuery $(element).attr("class") returns the list of all classes of the element as string space-delimited; you can set an array by splitting this string by " " and get last:
|


