Inactive Tutor answered 04/10/20
Tutor
New to Wyzant
I have no idea the structure of your HTML, so you will want to change the CSS selector employed, but if you had something like this:
<div class="mama said knock you out"></div>
then, you could do something like this by basically splitting the class attribute on spaces into an array and then you could play with it from there:
var yourClasses = $("div").attr("class").split(/\s+/);
$.each(yourClasses, function (idx, cls) {
console.log(cls);
});