Klaus Hartl schrieb:
> Dave Methvin schrieb:
>>> Would this be a candidate for addition to the core possibly?
>>
>> The ancestorsTo looks like it's an up-the-tree analog of the nextUntil
>> method for siblings that was discussed here a while back. I think the
>> general consensus on that was that there would be an extended navigation
>> plugin rather than add all these to the core. Maybe they should be named
>> ancestorsUntil and siblingsUntil for better consistency?
>>
>> Also, since this is a modifying plugin it should use pushStack() to allow
>> the use of .end() to get back to the previous selected nodes. I think the
>> end result would be something like this, untested:
>>
>> jQuery.fn.ancestorsUntil = function(match) {
>> var a = [];
>> jQuery(this[0]).ancestors().each(function() {
>> a.push(this);
>> return !jQuery(this).is(match);
>> });
>> return this.pushStack(a, arguments);
>> };
>
> What is the difference between this plugin and $('li').parents('.myClass') ?
After reading the first post again I know...
-- Klaus
_______________________________________________
jQuery mailing list
[email protected]
http://jquery.com/discuss/