jQuery selectors: logical OR

css-selectors, jquery, jquery-selectors

Solution

What about: `$some_elements.eq(0).nextUntil('.headsection, .subtitle');`

Works for me at least. Read about multiple selectors.

Problem

I can't seem to see the forest for the trees right now (Looked at the api docs already). It has to do with jQuery selectors: What I'm trying to do is to select all elements that have class `subtitle` or `headsection`. Something like this: `$('.headsection || .subtitle');` To be more specific: I want to use this selector with the function `nextUntil`. ``` $content = $some_elements.eq(0).nextUntil('.headsection || subtitle'); ``` As far as I know `||` is not available in jQuery's selectors. So what's the best way to accomplish that? Thanks for your help!

Original source