[jQuery] Select Next n Number of Elements Up To .myClass
I have a series of elements such as:
<p id="abc" class="myClass">
Some data
Some data
Some data
Some data
Some data
<p class="myClass">
Some data
Some data
Some data
...
In short I want to find the next n elements up to where class equals .foo
$('#abc').click(function() {
$('~ p', this).not('.myClass').hide();
});
There isn't a fixed number of P elements...
Cheers,
-js
_______________________________________________
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/