> Why does $(0) return a document? Is this intended behaviour? In 1.3.2, $(anything_falsy) returns the document. In the nightlies, $ (anything_falsy) returns an empty jQuery object. It was changed because $(undefined) returned the document and that could lead to some hard-to-debug situations.
> I would expect it to return 0. The docs don't say what happens when you pass a number to $(), so it's not an expected argument to the constructor. http://docs.jquery.com/Core/jQuery#expressioncontext "This function accepts a string containing a CSS selector..." Did you find this by accident, or are you writing code that depends on $(2) returning 2? -- You received this message because you are subscribed to the Google Groups "jQuery Development" group. To post to this group, send email to jquery-...@googlegroups.com. To unsubscribe from this group, send email to jquery-dev+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/jquery-dev?hl=en.