From: Brandon Aaron Date: Thu, 2 Nov 2006 19:53:11 +0000 (+0000) Subject: Fix jQuery constructor to handle DOM NodeLists properly in Safari X-Git-Tag: 1.0.4~64 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=0c45d03c70c322825c5532466f9ac1201e79d1d5;p=jquery.git Fix jQuery constructor to handle DOM NodeLists properly in Safari --- diff --git a/src/jquery/jquery.js b/src/jquery/jquery.js index 996ace866..bdbf97c1f 100644 --- a/src/jquery/jquery.js +++ b/src/jquery/jquery.js @@ -31,7 +31,7 @@ window.undefined = window.undefined; var jQuery = function(a,c) { // Shortcut for document ready (because $(document).each() is silly) - if ( a && typeof a == "function" && jQuery.fn.ready ) + if ( a && typeof a == "function" && jQuery.fn.ready && a.length == undefined ) // Safari reports DOM NodeLists typeof as function return jQuery(document).ready(a); // Make sure that a selection was provided