wetfish / basic

A tiny, customizable JavaScript UI framework.
MIT License
9 stars 3 forks source link

.hasClass() should allow matching multiple classes #20

Closed itsrachelfish closed 9 years ago

itsrachelfish commented 9 years ago

Right now the only way to match if an element has multiple classes is by calling hasClass() multiple times. It would be convenient if you could match multiple classes, with an option if all classes are required (AND) or if only at least one is required (OR).

For example:

$('.element').hasClass('one two');
$('.element').hasClass('one two', 'or');
itsrachelfish commented 9 years ago

This issue was actually fixed as of commit 7498b9cc5d2f160cd740b5695c7f6da3944f95f7 by adding the AND / OR options.