I want to select all items which are in one class and NOT in a set of other classes. For the first step, I imagined something like this would work, but didn’t:
$('.class1,!.class2')
What I actually have is a list of classes that I don’t want to select:
dont_select = ['class2', 'class3', 'class4']
And I want to select all items which have class1 but not any class in my array of classes in dont_select (which varies in length). Thanks,
Try this: