findParent stops if a matching parent has been found. parents, however, continues climbing up the DOM.

2006/7/21, Christof Donat <[EMAIL PROTECTED]>:
Hi,

> jQuery.fn.findParent = function(c) {
>   return this.pushStack( jQuery.map(this, function(a) {
>     while (a = a.parentNode) {
>       if (jQuery.filter(c,[a]).r.length) return a;
>     }
>   }));
> };

I can not see how the result is different to parents().

Christof

_______________________________________________
jQuery mailing list
[email protected]
http://jquery.com/discuss/

_______________________________________________
jQuery mailing list
[email protected]
http://jquery.com/discuss/

Reply via email to