I should note that I really do want to make $() == [], I just want to
make sure that no one's code is broken because of it. I'm fairly
certain that it won't cause major problems, but I'm not 100% certain.

(Note: Actually .ready() ignores the incoming selector when it binds
the ready event, although that might changed - we'll see.)

--John



On Fri, Aug 21, 2009 at 8:38 AM, Brandon Aaron<brandon.aa...@gmail.com> wrote:
>
> 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