filter() is another option
Reduce the set of matched elements to those that match the selector or pass the function's test.
$(selector).filter('.class1, .class2'); //Filter elements: class1 OR class2
$(selector).filter('.class1.class2'); // Filter elements: class1 AND class2