Not /yet/ - however I do have the following function planned:
$("dt").nextUntil("dt")
Which will select all the follow elements until it hits one that
matches the expression - which is just what you want. It may be "a
little bit" before I get it into the core, proper - so just something
to consider.
I haven't tested this, but maybe something like:
$.fn.nextUntil = function(expr) {
var match = [];
this.each(function(){
var cur = this.nextSibling;
while ( cur && jQuery.filter( expr, [cur] ).r.length ) {
match = jQuery.merge( match, [ cur ] );
cur = cur.nextSibling;
}
});
return this.pushStack( match, arguments );
};
--John
On 8/31/06, Wil Stuckey <[EMAIL PROTECTED]> wrote:
> Ok I have a DL that looks something like this:
>
> <dl>
> <dt class="one"></dt>
> <dd></dd>
> <dd></dd>
> <dd></dd>
> <dd></dd>
>
> <dt class="two"></dt>
> <dd></dd>
> <dd></dd>
> <dd></dd>
> <dd></dd>
> </dl>
>
> Now, I would like to write a jQuery expression that would select dt.one and
> all dd siblings until it reaches dt.two.
>
> Any clever ideas would be most helpful
>
> Thanks,
> Wil
>
> _______________________________________________
> jQuery mailing list
> [email protected]
> http://jquery.com/discuss/
>
>
>
--
John Resig
http://ejohn.org/
[EMAIL PROTECTED]
_______________________________________________
jQuery mailing list
[email protected]
http://jquery.com/discuss/