I'm searching a way to check if a div has exactly the classes in my list. Example:
My list of classes: .cat, .dog and .fish
If the div .animals has only divs with these classes, do something, but if there's another class wich is not included in my list (i.e.: .cat, .dog, .fish and .house) or if a class is missing (i.e.: .cat and .dog) do something different.
There's a way to do this? I tried to check with .has(), .hasclass() and .is(), but I couldn't make it work as I want.