You can add a second class to your CSS rule by appending another dot and the class name: // Finds child elements that contain both classes $('div').find('.class-one.class-two');
-Hector On Mon, Dec 8, 2008 at 7:28 PM, mgl <[EMAIL PROTECTED]> wrote: > > Hello again, > > Does anyone know how (or if it is possible) to select elements by > multiple class names? > > For example, given the following div elements: > > <div class="class-one"> > <div class="class-one class-two"> > > If I wanted to get all div elements that have *both* class-one and > class-two, the only straight-forward way I can think of is the > following: > > $("div").filter(".class-one").filter(".class-two"); > > It would be nice if I could do this with a single expression > instead...is that possible? >