From e9917ab8373b5e79c2a4315ad7f75be2cecf5ae1 Mon Sep 17 00:00:00 2001 From: Brandon Aaron Date: Thu, 2 Nov 2006 23:07:13 +0000 Subject: [PATCH] Fix for passing jQuery constructor a DOM NodeList in Safari and an object or embed HTMLElement in Firefox. --- src/jquery/jquery.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/jquery/jquery.js b/src/jquery/jquery.js index 996ace8..aa2582a 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.nodeType && a[0] == undefined ) // Safari reports typeof on DOM NodeLists as a function return jQuery(document).ready(a); // Make sure that a selection was provided -- 1.7.10.4