How to determine if class exists on page

How to determine if class exists on page

Hi there. I need to determine whether a class exists on a page. I have 4 boxes: #box1, #box2, #box3, #box4 and at any time any of these may have the class "active" (depending on whether any box has been clicked or unclicked (toggled), etc).

How do I best determine if the "active" class exists? Frankly, I'd prefer to determine whether it  does not exist. Would that best be done using ".length"?

TIA.