Fix for #1163
This commit is contained in:
parent
009033bb45
commit
a34a1a599b
2 changed files with 5 additions and 2 deletions
5
src/jquery/coreTest.js
vendored
5
src/jquery/coreTest.js
vendored
|
@ -12,7 +12,7 @@ test("Basic requirements", function() {
|
||||||
});
|
});
|
||||||
|
|
||||||
test("$()", function() {
|
test("$()", function() {
|
||||||
expect(3);
|
expect(4);
|
||||||
|
|
||||||
var main = $("#main");
|
var main = $("#main");
|
||||||
isSet( $("div p", main).get(), q("sndp", "en", "sap"), "Basic selector with jQuery object as context" );
|
isSet( $("div p", main).get(), q("sndp", "en", "sap"), "Basic selector with jQuery object as context" );
|
||||||
|
@ -32,6 +32,9 @@ test("$()", function() {
|
||||||
pass = false;
|
pass = false;
|
||||||
}
|
}
|
||||||
ok( pass, "$('<tag>') needs optional document parameter to ease cross-frame DOM wrangling, see #968" );
|
ok( pass, "$('<tag>') needs optional document parameter to ease cross-frame DOM wrangling, see #968" );
|
||||||
|
|
||||||
|
var form = $("form")[0];
|
||||||
|
equals( 15, $(form.elements).size(), "$(form.elements)" );
|
||||||
});
|
});
|
||||||
|
|
||||||
test("isFunction", function() {
|
test("isFunction", function() {
|
||||||
|
|
2
src/jquery/jquery.js
vendored
2
src/jquery/jquery.js
vendored
|
@ -176,7 +176,7 @@ jQuery.fn = jQuery.prototype = {
|
||||||
|
|
||||||
// HANDLE: $(arraylike)
|
// HANDLE: $(arraylike)
|
||||||
// Watch for when an array-like object is passed as the selector
|
// Watch for when an array-like object is passed as the selector
|
||||||
(a.jquery || a.length && a != window && !a.nodeType && a[0] != undefined && a[0].nodeType) && jQuery.makeArray( a ) ||
|
(a.jquery || a.length && a != window && (!a.nodeType || (jQuery.browser.msie && a.elements)) && a[0] != undefined && a[0].nodeType) && jQuery.makeArray( a ) ||
|
||||||
|
|
||||||
// HANDLE: $(*)
|
// HANDLE: $(*)
|
||||||
[ a ] );
|
[ a ] );
|
||||||
|
|
Loading…
Reference in a new issue