Re: [jQuery] ancestors, parent and parents

2006-09-04 Thread John Resig
> I do think it would be better if parents wasn't there though (if it is the
> same as ancestors). Why would you have two functions that do the same thing?

The main reason is that not everyone comes from an XPath/XML
background - it's the same reason why there's .find() and not
.descendants(). It's like 4 extra bytes to include .parents(). Back
when we were originally planning out the names for this feature, there
was a definite tension between using XPath-style verbage versus
'english' words. I think this is an acceptable compromise.

--John

___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] ancestors, parent and parents

2006-09-04 Thread Sam Collett
On 04/09/06, Yehuda Katz <[EMAIL PROTECTED]> wrote:
Parent is the direct parent of the node(s). Ancestors and parents are any parents, no matter how high up in hierarchy.I do think it would be better if parents wasn't there though (if it is the same as ancestors). Why would you have two functions that do the same thing?

___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] ancestors, parent and parents

2006-09-04 Thread Yehuda Katz
Parent is the direct parent of the node(s). Ancestors and parents are any parents, no matter how high up in hierarchy.On 9/4/06, Sam Collett <
[EMAIL PROTECTED]> wrote:What is the difference between these three?
ancestors and parents look like they are the same, but how is parent different?


___jQuery mailing listdiscuss@jquery.com
http://jquery.com/discuss/-- Yehuda KatzWeb Developer(ph)  718.877.1325(fax) 718.686.4288
___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


[jQuery] ancestors, parent and parents

2006-09-04 Thread Sam Collett
What is the difference between these three?ancestors and parents look like they are the same, but how is parent different?

___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/