mirror of
https://github.com/jquery/jquery.git
synced 2024-11-23 02:54:22 +00:00
Fix typos. Close gh-1186.
This commit is contained in:
parent
69b3d5ce0f
commit
a13cadadf6
@ -161,3 +161,4 @@ Danil Somsikov <danilasomsikov@gmail.com>
|
|||||||
Jean Boussier <jean.boussier@gmail.com>
|
Jean Boussier <jean.boussier@gmail.com>
|
||||||
Adam Coulombe <me@adam.co>
|
Adam Coulombe <me@adam.co>
|
||||||
Andrew Plummer <plummer.andrew@gmail.com>
|
Andrew Plummer <plummer.andrew@gmail.com>
|
||||||
|
Dmitry Gusev <dmitry.gusev@gmail.com>
|
||||||
|
File diff suppressed because one or more lines are too long
2
speed/jquery-basis.js
vendored
2
speed/jquery-basis.js
vendored
@ -788,7 +788,7 @@ function evalScript( i, elem ) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Mutifunctional method to get and set values to a collection
|
// Multifunctional method to get and set values to a collection
|
||||||
// The value/s can be optionally by executed if its a function
|
// The value/s can be optionally by executed if its a function
|
||||||
function access( elems, key, value, exec, fn, pass ) {
|
function access( elems, key, value, exec, fn, pass ) {
|
||||||
var length = elems.length;
|
var length = elems.length;
|
||||||
|
@ -44,7 +44,7 @@
|
|||||||
#8135
|
#8135
|
||||||
</a>
|
</a>
|
||||||
which was reported in Firefox when accessing properties
|
which was reported in Firefox when accessing properties
|
||||||
of an XMLHttpRequest object after a network error occured.
|
of an XMLHttpRequest object after a network error occurred.
|
||||||
</div>
|
</div>
|
||||||
<div>Take the following steps:</div>
|
<div>Take the following steps:</div>
|
||||||
<ol>
|
<ol>
|
||||||
|
@ -435,7 +435,7 @@ module( "ajax", {
|
|||||||
url: url("data/name.html"),
|
url: url("data/name.html"),
|
||||||
context: {},
|
context: {},
|
||||||
success: function() {
|
success: function() {
|
||||||
ok( this !== obj, "Make sure overidding context is possible." );
|
ok( this !== obj, "Make sure overriding context is possible." );
|
||||||
}
|
}
|
||||||
}]
|
}]
|
||||||
};
|
};
|
||||||
@ -1238,14 +1238,14 @@ module( "ajax", {
|
|||||||
xhr.overrideMimeType( "application/json" );
|
xhr.overrideMimeType( "application/json" );
|
||||||
},
|
},
|
||||||
success: function( json ) {
|
success: function( json ) {
|
||||||
ok( json.data, "Mimetype overriden using beforeSend" );
|
ok( json.data, "Mimetype overridden using beforeSend" );
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
url: url("data/json.php"),
|
url: url("data/json.php"),
|
||||||
mimeType: "application/json",
|
mimeType: "application/json",
|
||||||
success: function( json ) {
|
success: function( json ) {
|
||||||
ok( json.data, "Mimetype overriden using mimeType option" );
|
ok( json.data, "Mimetype overridden using mimeType option" );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]);
|
]);
|
||||||
|
@ -70,7 +70,7 @@ test( "attr(String)", function() {
|
|||||||
equal( jQuery("#text1").attr("value", "t").attr("value"), "t", "Check setting the value attribute" );
|
equal( jQuery("#text1").attr("value", "t").attr("value"), "t", "Check setting the value attribute" );
|
||||||
equal( jQuery("#text1").attr("value", "").attr("value"), "", "Check setting the value attribute to empty string" );
|
equal( jQuery("#text1").attr("value", "").attr("value"), "", "Check setting the value attribute to empty string" );
|
||||||
equal( jQuery("<div value='t'></div>").attr("value"), "t", "Check setting custom attr named 'value' on a div" );
|
equal( jQuery("<div value='t'></div>").attr("value"), "t", "Check setting custom attr named 'value' on a div" );
|
||||||
equal( jQuery("#form").attr("blah", "blah").attr("blah"), "blah", "Set non-existant attribute on a form" );
|
equal( jQuery("#form").attr("blah", "blah").attr("blah"), "blah", "Set non-existent attribute on a form" );
|
||||||
equal( jQuery("#foo").attr("height"), undefined, "Non existent height attribute should return undefined" );
|
equal( jQuery("#foo").attr("height"), undefined, "Non existent height attribute should return undefined" );
|
||||||
|
|
||||||
// [7472] & [3113] (form contains an input with name="action" or name="id")
|
// [7472] & [3113] (form contains an input with name="action" or name="id")
|
||||||
@ -343,7 +343,7 @@ test( "attr(String, Object)", function() {
|
|||||||
equal( $text.attr( "required", false ).attr("required"), undefined, "Setting required attribute to false removes it" );
|
equal( $text.attr( "required", false ).attr("required"), undefined, "Setting required attribute to false removes it" );
|
||||||
|
|
||||||
var $details = jQuery("<details open></details>").appendTo("#qunit-fixture");
|
var $details = jQuery("<details open></details>").appendTo("#qunit-fixture");
|
||||||
equal( $details.attr("open"), "open", "open attribute presense indicates true" );
|
equal( $details.attr("open"), "open", "open attribute presence indicates true" );
|
||||||
equal( $details.attr( "open", false ).attr("open"), undefined, "Setting open attribute to false removes it" );
|
equal( $details.attr( "open", false ).attr("open"), undefined, "Setting open attribute to false removes it" );
|
||||||
|
|
||||||
$text.attr( "data-something", true );
|
$text.attr( "data-something", true );
|
||||||
|
@ -945,8 +945,8 @@ test("jQuery.extend(Object, Object)", function() {
|
|||||||
ok( jQuery.extend(true, {}, nestedarray)["arr"] !== arr, "Deep extend of object must clone child array" );
|
ok( jQuery.extend(true, {}, nestedarray)["arr"] !== arr, "Deep extend of object must clone child array" );
|
||||||
|
|
||||||
// #5991
|
// #5991
|
||||||
ok( jQuery.isArray( jQuery.extend(true, { "arr": {} }, nestedarray)["arr"] ), "Cloned array heve to be an Array" );
|
ok( jQuery.isArray( jQuery.extend(true, { "arr": {} }, nestedarray)["arr"] ), "Cloned array have to be an Array" );
|
||||||
ok( jQuery.isPlainObject( jQuery.extend(true, { "arr": arr }, { "arr": {} })["arr"] ), "Cloned object heve to be an plain object" );
|
ok( jQuery.isPlainObject( jQuery.extend(true, { "arr": arr }, { "arr": {} })["arr"] ), "Cloned object have to be an plain object" );
|
||||||
|
|
||||||
var empty = {};
|
var empty = {};
|
||||||
var optionsWithLength = { "foo": { "length": -1 } };
|
var optionsWithLength = { "foo": { "length": -1 } };
|
||||||
@ -992,10 +992,10 @@ test("jQuery.extend(Object, Object)", function() {
|
|||||||
deepEqual( target, { bar:5 }, "Check to make sure a recursive obj doesn't go never-ending loop by not copying it over" );
|
deepEqual( target, { bar:5 }, "Check to make sure a recursive obj doesn't go never-ending loop by not copying it over" );
|
||||||
|
|
||||||
ret = jQuery.extend(true, { foo: [] }, { foo: [0] } ); // 1907
|
ret = jQuery.extend(true, { foo: [] }, { foo: [0] } ); // 1907
|
||||||
equal( ret.foo.length, 1, "Check to make sure a value with coersion 'false' copies over when necessary to fix #1907" );
|
equal( ret.foo.length, 1, "Check to make sure a value with coercion 'false' copies over when necessary to fix #1907" );
|
||||||
|
|
||||||
ret = jQuery.extend(true, { foo: "1,2,3" }, { foo: [1, 2, 3] } );
|
ret = jQuery.extend(true, { foo: "1,2,3" }, { foo: [1, 2, 3] } );
|
||||||
ok( typeof ret.foo != "string", "Check to make sure values equal with coersion (but not actually equal) overwrite correctly" );
|
ok( typeof ret.foo != "string", "Check to make sure values equal with coercion (but not actually equal) overwrite correctly" );
|
||||||
|
|
||||||
ret = jQuery.extend(true, { foo:"bar" }, { foo:null } );
|
ret = jQuery.extend(true, { foo:"bar" }, { foo:null } );
|
||||||
ok( typeof ret.foo !== "undefined", "Make sure a null value doesn't crash with deep extend, for #1908" );
|
ok( typeof ret.foo !== "undefined", "Make sure a null value doesn't crash with deep extend, for #1908" );
|
||||||
|
@ -68,7 +68,7 @@ test("width(Function(args))", function() {
|
|||||||
|
|
||||||
var $div = jQuery("#nothiddendiv");
|
var $div = jQuery("#nothiddendiv");
|
||||||
$div.width( 30 ).width(function(i, width) {
|
$div.width( 30 ).width(function(i, width) {
|
||||||
equal( width, 30, "Make sure previous value is corrrect." );
|
equal( width, 30, "Make sure previous value is correct." );
|
||||||
return width + 1;
|
return width + 1;
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -119,7 +119,7 @@ test("height(Function(args))", function() {
|
|||||||
|
|
||||||
var $div = jQuery("#nothiddendiv");
|
var $div = jQuery("#nothiddendiv");
|
||||||
$div.height( 30 ).height(function(i, height) {
|
$div.height( 30 ).height(function(i, height) {
|
||||||
equal( height, 30, "Make sure previous value is corrrect." );
|
equal( height, 30, "Make sure previous value is correct." );
|
||||||
return height + 1;
|
return height + 1;
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -271,7 +271,7 @@ test("child of a hidden elem (or unconnected node) has accurate inner/outer/Widt
|
|||||||
$divNormal.remove();
|
$divNormal.remove();
|
||||||
});
|
});
|
||||||
|
|
||||||
test("getting dimensions shouldnt modify runtimeStyle see #9233", function() {
|
test("getting dimensions shouldn't modify runtimeStyle see #9233", function() {
|
||||||
expect( 1 );
|
expect( 1 );
|
||||||
|
|
||||||
var $div = jQuery( "<div>" ).appendTo( "#qunit-fixture" ),
|
var $div = jQuery( "<div>" ).appendTo( "#qunit-fixture" ),
|
||||||
@ -288,7 +288,7 @@ test("getting dimensions shouldnt modify runtimeStyle see #9233", function() {
|
|||||||
if ( runtimeStyle ) {
|
if ( runtimeStyle ) {
|
||||||
equal( div.runtimeStyle.left, "11em", "getting dimensions modifies runtimeStyle, see #9233" );
|
equal( div.runtimeStyle.left, "11em", "getting dimensions modifies runtimeStyle, see #9233" );
|
||||||
} else {
|
} else {
|
||||||
ok( true, "this browser doesnt support runtimeStyle, see #9233" );
|
ok( true, "this browser doesn't support runtimeStyle, see #9233" );
|
||||||
}
|
}
|
||||||
|
|
||||||
$div.remove();
|
$div.remove();
|
||||||
|
@ -1001,7 +1001,7 @@ test("trigger(type, [data], [fn])", function() {
|
|||||||
|
|
||||||
jQuery( document ).off( "mouseenter mouseleave", "#firstp");
|
jQuery( document ).off( "mouseenter mouseleave", "#firstp");
|
||||||
|
|
||||||
// Triggers handlrs and native
|
// Triggers handlers and native
|
||||||
// Trigger 5
|
// Trigger 5
|
||||||
$elem.bind("click", handler).trigger("click", [1, "2", "abc"]);
|
$elem.bind("click", handler).trigger("click", [1, "2", "abc"]);
|
||||||
|
|
||||||
@ -1570,7 +1570,7 @@ test(".delegate()/.undelegate()", function() {
|
|||||||
equal( livea, 1, "undelegate Click on inner div" );
|
equal( livea, 1, "undelegate Click on inner div" );
|
||||||
equal( liveb, 0, "undelegate Click on inner div" );
|
equal( liveb, 0, "undelegate Click on inner div" );
|
||||||
|
|
||||||
// Make sure that stopPropgation doesn't stop live events
|
// Make sure that stopPropagation doesn't stop live events
|
||||||
submit = 0; div = 0; livea = 0; liveb = 0;
|
submit = 0; div = 0; livea = 0; liveb = 0;
|
||||||
jQuery("#body").delegate("div#nothiddendivchild", "click", function(e){ liveb++; e.stopPropagation(); });
|
jQuery("#body").delegate("div#nothiddendivchild", "click", function(e){ liveb++; e.stopPropagation(); });
|
||||||
jQuery("div#nothiddendivchild").trigger("click");
|
jQuery("div#nothiddendivchild").trigger("click");
|
||||||
@ -1701,7 +1701,7 @@ test(".delegate()/.undelegate()", function() {
|
|||||||
// Cleanup
|
// Cleanup
|
||||||
jQuery("#body").undelegate("#nothiddendivchild", "click");
|
jQuery("#body").undelegate("#nothiddendivchild", "click");
|
||||||
|
|
||||||
// Verify that .live() ocurs and cancel buble in the same order as
|
// Verify that .live() occurs and cancel bubble in the same order as
|
||||||
// we would expect .bind() and .click() without delegation
|
// we would expect .bind() and .click() without delegation
|
||||||
var lived = 0, livee = 0;
|
var lived = 0, livee = 0;
|
||||||
|
|
||||||
|
@ -39,14 +39,14 @@ test( "text()", function() {
|
|||||||
equal( jQuery("#sap").text(), expected, "Check for merged text of more then one element." );
|
equal( jQuery("#sap").text(), expected, "Check for merged text of more then one element." );
|
||||||
|
|
||||||
// Check serialization of text values
|
// Check serialization of text values
|
||||||
equal( jQuery(document.createTextNode("foo")).text(), "foo", "Text node was retreived from .text()." );
|
equal( jQuery(document.createTextNode("foo")).text(), "foo", "Text node was retrieved from .text()." );
|
||||||
notEqual( jQuery(document).text(), "", "Retrieving text for the document retrieves all text (#10724)." );
|
notEqual( jQuery(document).text(), "", "Retrieving text for the document retrieves all text (#10724)." );
|
||||||
|
|
||||||
// Retrieve from document fragments #10864
|
// Retrieve from document fragments #10864
|
||||||
frag = document.createDocumentFragment();
|
frag = document.createDocumentFragment();
|
||||||
frag.appendChild( document.createTextNode("foo") );
|
frag.appendChild( document.createTextNode("foo") );
|
||||||
|
|
||||||
equal( jQuery(frag).text(), "foo", "Document Fragment Text node was retreived from .text()." );
|
equal( jQuery(frag).text(), "foo", "Document Fragment Text node was retrieved from .text()." );
|
||||||
|
|
||||||
$newLineTest = jQuery("<div>test<br/>testy</div>").appendTo("#moretests");
|
$newLineTest = jQuery("<div>test<br/>testy</div>").appendTo("#moretests");
|
||||||
$newLineTest.find("br").replaceWith("\n");
|
$newLineTest.find("br").replaceWith("\n");
|
||||||
|
@ -71,11 +71,11 @@ test("is(String|undefined)", function() {
|
|||||||
ok( !jQuery("#foo").is(undefined), "Expected false for an invalid expression - undefined" );
|
ok( !jQuery("#foo").is(undefined), "Expected false for an invalid expression - undefined" );
|
||||||
ok( !jQuery("#foo").is({ plain: "object" }), "Check passing invalid object" );
|
ok( !jQuery("#foo").is({ plain: "object" }), "Check passing invalid object" );
|
||||||
|
|
||||||
// test is() with comma-seperated expressions
|
// test is() with comma-separated expressions
|
||||||
ok( jQuery("#en").is("[lang=\"en\"],[lang=\"de\"]"), "Comma-seperated; Check for lang attribute: Expect en or de" );
|
ok( jQuery("#en").is("[lang=\"en\"],[lang=\"de\"]"), "Comma-separated; Check for lang attribute: Expect en or de" );
|
||||||
ok( jQuery("#en").is("[lang=\"de\"],[lang=\"en\"]"), "Comma-seperated; Check for lang attribute: Expect en or de" );
|
ok( jQuery("#en").is("[lang=\"de\"],[lang=\"en\"]"), "Comma-separated; Check for lang attribute: Expect en or de" );
|
||||||
ok( jQuery("#en").is("[lang=\"en\"] , [lang=\"de\"]"), "Comma-seperated; Check for lang attribute: Expect en or de" );
|
ok( jQuery("#en").is("[lang=\"en\"] , [lang=\"de\"]"), "Comma-separated; Check for lang attribute: Expect en or de" );
|
||||||
ok( jQuery("#en").is("[lang=\"de\"] , [lang=\"en\"]"), "Comma-seperated; Check for lang attribute: Expect en or de" );
|
ok( jQuery("#en").is("[lang=\"de\"] , [lang=\"en\"]"), "Comma-separated; Check for lang attribute: Expect en or de" );
|
||||||
});
|
});
|
||||||
|
|
||||||
test("is() against window|document (#10178)", function() {
|
test("is() against window|document (#10178)", function() {
|
||||||
@ -606,9 +606,9 @@ test("prevUntil([String])", function() {
|
|||||||
test("contents()", function() {
|
test("contents()", function() {
|
||||||
expect(12);
|
expect(12);
|
||||||
equal( jQuery("#ap").contents().length, 9, "Check element contents" );
|
equal( jQuery("#ap").contents().length, 9, "Check element contents" );
|
||||||
ok( jQuery("#iframe").contents()[0], "Check existance of IFrame document" );
|
ok( jQuery("#iframe").contents()[0], "Check existence of IFrame document" );
|
||||||
var ibody = jQuery("#loadediframe").contents()[0].body;
|
var ibody = jQuery("#loadediframe").contents()[0].body;
|
||||||
ok( ibody, "Check existance of IFrame body" );
|
ok( ibody, "Check existence of IFrame body" );
|
||||||
|
|
||||||
equal( jQuery("span", ibody).text(), "span text", "Find span in IFrame and check its text" );
|
equal( jQuery("span", ibody).text(), "span text", "Find span in IFrame and check its text" );
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user