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
I was looking over the API and saw the $().siblings(expr) method. Could that be used to accomplish something similar to the above? like: $('dt').siblings('dd').not('dt') ??
-Wil
_______________________________________________ jQuery mailing list [email protected] http://jquery.com/discuss/
