Skip to content
Permalink
Browse files
Fix jQuery constructor to handle DOM NodeLists properly in Safari
  • Loading branch information
brandonaaron committed Nov 2, 2006
1 parent 4f92b34 commit 0c45d03
Showing 1 changed file with 1 addition and 1 deletion.
@@ -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

0 comments on commit 0c45d03

Please sign in to comment.