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 e9917ab8373b5e79c2a4315ad7f75be2cecf5ae1
Showing with 1 addition and 1 deletion.
  1. +1 −1 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

0 comments on commit e9917ab

Please sign in to comment.
You can’t perform that action at this time.