Checking classes like this is very fragile -- a lot of code would need to change if you ever added new classes to your elements, or even changed the order of the existing classes. `data-` attributes would be preferable.