Skip to content
Permalink
Browse files
Fix for passing jQuery constructor a DOM NodeList in Safari and an ob…
…ject or embed HTMLElement in Firefox.
  • Loading branch information
brandonaaron committed Nov 2, 2006
1 parent d6d3316 commit e9917ab
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.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

0 comments on commit e9917ab

Please sign in to comment.