This is fixed in jQuery SVN. The only one that still returns the
document is by not passing anything to jQuery: $() => [document] but
all the others you posted return and empty collection.

This is due to backwards compatibility so that $().ready(fn) continues
to work properly.

--
Brandon Aaron

On Fri, Aug 21, 2009 at 1:37 PM, Már Örlygsson<mar.orlygs...@gmail.com> wrote:
>
> I just got bitten by an unexpected (for me at least) behaviour of the
> jQuery() function:
>
> $(), $(''), $(0), $(null) and $(undefined), all return a collection
> equal to $(document).
>
> ...this causes weird things to happen when one converts a String to a
> dom, when the string happens to be empty.
>
> Somehow I expected
>    $('body').append( $(html) );
>
> to be functionally equivalent  to
>    $('body').append( html );
>
> Is that an unreasonable expectation, and if not, is it too late to
> fix?
>
>
> --
> Már
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"jQuery Development" group.
To post to this group, send email to jquery-dev@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
-~----------~----~----~----~------~----~------~--~---

Reply via email to