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 ele
It's the same as in CSS selectors:
$('.headsection, .subtitle');
What about: $some_elements.eq(0).nextUntil('.headsection, .subtitle');
Works for me at least. Read about multiple selectors.
Would the multiple selector work for what you're doing? Api doc is here.
Just separate them with a comma:
$content = $some_elements.eq(0).nextUntil('.headsection, subtitle');
You don't really need a logical OR as such, $('.headsection, .subtitle')
should do the job.
jQuery uses the CSS selector syntax, so if you know that, just put the same selectors into jQuery and bob's your metaphorical uncle. jQuery uses the sizzle selector engine which supports virtually all CSS3 selectors :)
As everyone has already said - the way to do it is this: $content = $some_elements.eq(0).nextUntil('.headsection, subtitle');