Skip to content

Commit

Permalink
Fix jQuery constructor to handle DOM NodeLists properly in Safari
Browse files Browse the repository at this point in the history
  • Loading branch information
brandonaaron committed Nov 2, 2006
1 parent 4f92b34 commit 0c45d03
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/jquery/jquery.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 0c45d03

Please sign in to comment.