> Do you know what the nodeType test is for on that line? 

That nodeType test is trying to tell the difference between a NodeList and a
DOMElement. If it's a DOMElement it will have a non-zero nodeType.

> What would break if we took it out?

If you took it out, any DOMElement with a .length property would be treated
like a list and not an element. For example, the form element has a length.
If you passed in $(document.myform) and myform had 3 elements, jQuery.length
would be 3 instead of 1. 

The intent was to allow collections like form.elements to pass in lists of
nodes but still let you pass in the form element if you wanted to refer to
just the form element. IE is spoiling that.



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

Reply via email to