Fix jQuery constructor to handle DOM NodeLists properly in Safari
This commit is contained in:
parent
4f92b34301
commit
0c45d03c70
2
src/jquery/jquery.js
vendored
2
src/jquery/jquery.js
vendored
|
@ -31,7 +31,7 @@ window.undefined = window.undefined;
|
||||||
var jQuery = function(a,c) {
|
var jQuery = function(a,c) {
|
||||||
|
|
||||||
// Shortcut for document ready (because $(document).each() is silly)
|
// 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);
|
return jQuery(document).ready(a);
|
||||||
|
|
||||||
// Make sure that a selection was provided
|
// Make sure that a selection was provided
|
||||||
|
|
Loading…
Reference in a new issue