From 9af27d66abf585dd6802ba12f9ddba1038b1227d Mon Sep 17 00:00:00 2001
From: Tom
Date: Tue, 27 Dec 2016 20:59:27 -0600
Subject: [PATCH 001/222] one(): Add named parameter to example
Fixes #1008
Closes #1016
---
entries/one.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/entries/one.xml b/entries/one.xml
index 588f1d55..8d37f3f8 100644
--- a/entries/one.xml
+++ b/entries/one.xml
@@ -60,7 +60,7 @@ $( "#foo" ).on( "click", function( event ) {
In other words, explicitly calling .off()
from within a regularly-bound handler has exactly the same effect.
If the first argument contains more than one space-separated event types, the event handler is called once for each event type.
-$( "#foo" ).one( "click mouseover", function() {
+$( "#foo" ).one( "click mouseover", function( event ) {
alert( "The " + event.type + " event happened!" );
});
From 53ffa06085f4cd8c729e6fdb494bf6579e332ace Mon Sep 17 00:00:00 2001
From: Aurelio De Rosa
Date: Tue, 20 Dec 2016 15:45:23 +0000
Subject: [PATCH 002/222] find(): Mention support for selectors starting with >
Fixes gh-973
Closes gh-1011
---
entries/find.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/entries/find.xml b/entries/find.xml
index 0a080a05..c6a32e84 100644
--- a/entries/find.xml
+++ b/entries/find.xml
@@ -18,7 +18,7 @@
Get the descendants of each element in the current set of matched elements, filtered by a selector, jQuery object, or element.
Given a jQuery object that represents a set of DOM elements, the .find()
method allows us to search through the descendants of these elements in the DOM tree and construct a new jQuery object from the matching elements. The .find()
and .children()
methods are similar, except that the latter only travels a single level down the DOM tree.
- The first signature for the .find()
method accepts a selector expression of the same type that we can pass to the $()
function. The elements will be filtered by testing whether they match this selector.
+ The first signature for the .find()
method accepts a selector expression of the same type that we can pass to the $()
function. The elements will be filtered by testing whether they match this selector. The expressions allowed include selectors like > p
which will find all the paragraphs that are children of the elements in the jQuery object.
Consider a page with a basic nested list on it:
<ul class="level-1">
From 6a2c8cd629feb3ba82a9ace9b2ef72de0455e818 Mon Sep 17 00:00:00 2001
From: Aurelio De Rosa
Date: Mon, 16 Jan 2017 22:04:29 +0000
Subject: [PATCH 003/222] 1.12.20
---
package.json | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/package.json b/package.json
index 3fb09190..ccd3be22 100644
--- a/package.json
+++ b/package.json
@@ -2,7 +2,7 @@
"name": "api.jquery.com",
"title": "jQuery API Docs",
"description": "API reference documentation for the jQuery JavaScript Library.",
- "version": "1.12.19",
+ "version": "1.12.20",
"homepage": "https://github.com/jquery/api.jquery.com",
"author": {
"name": "jQuery Foundation and other contributors"
From ab9fcb05f3981bbc11b15beb5912e2289a94319f Mon Sep 17 00:00:00 2001
From: Aurelio De Rosa
Date: Mon, 19 Dec 2016 16:57:19 +0000
Subject: [PATCH 004/222] ajax: Specified behavior for a timeout of 0
Fixes gh-979
Closes gh-1006
---
entries/jQuery.ajax.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/entries/jQuery.ajax.xml b/entries/jQuery.ajax.xml
index c35582bc..93fd2759 100644
--- a/entries/jQuery.ajax.xml
+++ b/entries/jQuery.ajax.xml
@@ -170,7 +170,7 @@ $.ajax({
A function to be called if the request succeeds. The function gets passed three arguments: The data returned from the server, formatted according to the dataType
parameter or the dataFilter
callback function, if specified; a string describing the status; and the jqXHR
(in jQuery 1.4.x, XMLHttpRequest) object. As of jQuery 1.5, the success setting can accept an array of functions. Each function will be called in turn. This is an Ajax Event.
- Set a timeout (in milliseconds) for the request. This will override any global timeout set with $.ajaxSetup(). The timeout period starts at the point the $.ajax
call is made; if several other requests are in progress and the browser has no connections available, it is possible for a request to time out before it can be sent. In jQuery 1.4.x and below, the XMLHttpRequest object will be in an invalid state if the request times out; accessing any object members may throw an exception. In Firefox 3.0+ only, script and JSONP requests cannot be cancelled by a timeout; the script will run even if it arrives after the timeout period.
+ Set a timeout (in milliseconds) for the request. A value of 0 means there will be no timeout. This will override any global timeout set with $.ajaxSetup(). The timeout period starts at the point the $.ajax
call is made; if several other requests are in progress and the browser has no connections available, it is possible for a request to time out before it can be sent. In jQuery 1.4.x and below, the XMLHttpRequest object will be in an invalid state if the request times out; accessing any object members may throw an exception. In Firefox 3.0+ only, script and JSONP requests cannot be cancelled by a timeout; the script will run even if it arrives after the timeout period.
Set this to true
if you wish to use the traditional style of param serialization.
From 79a5c0c9f8e2ed423a7bf9af7486dd47749b6a34 Mon Sep 17 00:00:00 2001
From: Mike Pennisi
Date: Sat, 21 Jan 2017 23:19:37 -0500
Subject: [PATCH 005/222] serializeArray: Document Behavior for Value-less
Input Elements
Close gh-1018
---
entries/serializeArray.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/entries/serializeArray.xml b/entries/serializeArray.xml
index bc46e920..4a836265 100644
--- a/entries/serializeArray.xml
+++ b/entries/serializeArray.xml
@@ -28,7 +28,7 @@
</div>
</form>
- The .serializeArray()
method uses the standard W3C rules for successful controls to determine which elements it should include; in particular the element cannot be disabled and must contain a name
attribute. No submit button value is serialized since the form was not submitted using a button. Data from file select elements is not serialized.
+ The .serializeArray()
method uses the standard W3C rules for successful controls to determine which elements it should include; in particular the element cannot be disabled and must contain a name
attribute. No submit button value is serialized since the form was not submitted using a button. Data from file select elements is not serialized. Elements that do not contain a value
attribute are represented with the empty string value.
This method can act on a jQuery object that has selected individual form controls, such as <input>
, <textarea>
, and <select>
. However, it is typically easier to select the <form>
element itself for serialization:
$( "form" ).submit(function( event ) {
From 874113df6ef381f34b0d3e27ddfd87f2b1955e1e Mon Sep 17 00:00:00 2001
From: Karl Swedberg
Date: Sat, 21 Jan 2017 23:20:25 -0500
Subject: [PATCH 006/222] 1.12.21
---
package.json | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/package.json b/package.json
index ccd3be22..368efd68 100644
--- a/package.json
+++ b/package.json
@@ -2,7 +2,7 @@
"name": "api.jquery.com",
"title": "jQuery API Docs",
"description": "API reference documentation for the jQuery JavaScript Library.",
- "version": "1.12.20",
+ "version": "1.12.21",
"homepage": "https://github.com/jquery/api.jquery.com",
"author": {
"name": "jQuery Foundation and other contributors"
From af3f23e7360ea8260bea002b70340dae107f1791 Mon Sep 17 00:00:00 2001
From: Aurelio De Rosa
Date: Tue, 20 Dec 2016 15:24:23 +0000
Subject: [PATCH 007/222] load(): Specified that load event alias is removed
Fixes #976
Closes #1010
---
entries/load.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/entries/load.xml b/entries/load.xml
index 951c43f6..3444cb90 100644
--- a/entries/load.xml
+++ b/entries/load.xml
@@ -21,7 +21,7 @@
Load data from the server and place the returned HTML into the matched element.
-
Note: The event handling suite also has a method named .load()
. jQuery determines which method to fire based on the set of arguments passed to it.
+
Note: Prior to jQuery 3.0, the event handling suite also had a method named .load()
. Older versions of jQuery determined which method to fire based on the set of arguments passed to it.
This method is the simplest way to fetch data from the server. It is roughly equivalent to $.get(url, data, success)
except that it is a method rather than global function and it has an implicit callback function. When a successful response is detected (i.e. when textStatus
is "success" or "notmodified"), .load()
sets the HTML contents of the matched element to the returned data. This means that most uses of the method can be quite simple:
From eceefcf142534cb51ae443157a4752c9357f3ebd Mon Sep 17 00:00:00 2001
From: denis
Date: Mon, 20 Feb 2017 17:54:40 +0100
Subject: [PATCH 008/222] jQuery.type: Add results for symbols (bare & boxed)
Closes #1025
---
entries/jQuery.type.xml | 2 ++
1 file changed, 2 insertions(+)
diff --git a/entries/jQuery.type.xml b/entries/jQuery.type.xml
index f77b3139..26dbe913 100644
--- a/entries/jQuery.type.xml
+++ b/entries/jQuery.type.xml
@@ -32,6 +32,8 @@
jQuery.type( new Array() ) === "array"
jQuery.type( new Date() ) === "date"
jQuery.type( new Error() ) === "error" // as of jQuery 1.9
+ jQuery.type( Symbol() ) === "symbol" // as of jQuery 1.9
+ jQuery.type( Object(Symbol()) ) === "symbol" // as of jQuery 1.12
jQuery.type( /test/ ) === "regexp"
From de9998303049b92d5e2f7cba88009cb55709e4fe Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Micha=C5=82=20Go=C5=82e=CC=A8biowski?=
Date: Wed, 1 Mar 2017 10:49:55 +0100
Subject: [PATCH 009/222] 1.12.22
---
package.json | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/package.json b/package.json
index 368efd68..574ad9d9 100644
--- a/package.json
+++ b/package.json
@@ -2,7 +2,7 @@
"name": "api.jquery.com",
"title": "jQuery API Docs",
"description": "API reference documentation for the jQuery JavaScript Library.",
- "version": "1.12.21",
+ "version": "1.12.22",
"homepage": "https://github.com/jquery/api.jquery.com",
"author": {
"name": "jQuery Foundation and other contributors"
From b7ec850f7c515318d24f268ff080d71ccdf7d33f Mon Sep 17 00:00:00 2001
From: Richard Gibson
Date: Sat, 21 Jan 2017 23:42:41 -0500
Subject: [PATCH 010/222] jQuery.ajax: Improve the jqXHR properties/methods
documentation
* Alphabetize properties and methods
* Add missing methods and parameters
* Clarify getAllResponseHeaders
* Standardize formatting
* Document getResponseHeader argument
Fixes gh-1019
Closes gh-1020
---
entries/jQuery.ajax.xml | 19 +++++++++++++------
1 file changed, 13 insertions(+), 6 deletions(-)
diff --git a/entries/jQuery.ajax.xml b/entries/jQuery.ajax.xml
index 93fd2759..393bc83c 100644
--- a/entries/jQuery.ajax.xml
+++ b/entries/jQuery.ajax.xml
@@ -280,25 +280,32 @@ jqxhr.always(function() {
readyState
+
+ responseXML
and/or responseText
when the underlying request responded with xml and/or text, respectively
+
status
statusText
- responseXML
and/or responseText
when the underlying request responded with xml and/or text, respectively
- setRequestHeader(name, value)
which departs from the standard by replacing the old value with the new one rather than concatenating the new value to the old one
- getAllResponseHeaders()
+ abort( [ statusText ] )
+
+
+ getAllResponseHeaders()
as a string
+
+
+ getResponseHeader( name )
- getResponseHeader()
+ overrideMimeType( mimeType )
- statusCode()
+ setRequestHeader( name, value )
which departs from the standard by replacing the old value with the new one rather than concatenating the new value to the old one
- abort()
+ statusCode( callbacksByStatusCode )
No onreadystatechange
mechanism is provided, however, since done
, fail
, always
, and statusCode
cover all conceivable requirements.
From b2b9d8acd523fa2da2147be1a18204217c17b361 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Micha=C5=82=20Go=C5=82e=CC=A8biowski?=
Date: Wed, 8 Mar 2017 10:41:29 +0100
Subject: [PATCH 011/222] 1.12.23
---
package.json | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/package.json b/package.json
index 574ad9d9..64b6253c 100644
--- a/package.json
+++ b/package.json
@@ -2,7 +2,7 @@
"name": "api.jquery.com",
"title": "jQuery API Docs",
"description": "API reference documentation for the jQuery JavaScript Library.",
- "version": "1.12.22",
+ "version": "1.12.23",
"homepage": "https://github.com/jquery/api.jquery.com",
"author": {
"name": "jQuery Foundation and other contributors"
From 3ab6720bdbeefa64d34bdb7d79bc03468788f49f Mon Sep 17 00:00:00 2001
From: Timo Tijhof
Date: Mon, 20 Mar 2017 15:34:07 -0700
Subject: [PATCH 012/222] jQuery.when: Add Thenable and Promise as acceptable
types
Technically replacing Deferred with Thenable would work, but
mentioning Deferred and Promise directly should make this
easier to understand for new and existing users.
Fixes #906
Closes #1026
---
entries/jQuery.when.xml | 9 ++++++---
pages/Types.html | 3 +++
2 files changed, 9 insertions(+), 3 deletions(-)
diff --git a/entries/jQuery.when.xml b/entries/jQuery.when.xml
index 09c8393e..a27f2adc 100644
--- a/entries/jQuery.when.xml
+++ b/entries/jQuery.when.xml
@@ -3,11 +3,14 @@
jQuery.when()
1.5
-
- Zero or more Deferred objects, or plain JavaScript objects.
+
+ Zero or more Thenable objects.
+
+
+
- Provides a way to execute callback functions based on zero or more objects, usually Deferred objects that represent asynchronous events.
+ Provides a way to execute callback functions based on zero or more Thenable objects, usually Deferred objects that represent asynchronous events.
If no arguments are passed to jQuery.when()
, it will return a resolved Promise.
If a single Deferred is passed to jQuery.when()
, its Promise object (a subset of the Deferred methods) is returned by the method. Additional methods of the Promise object can be called to attach callbacks, such as deferred.then
. When the Deferred is resolved or rejected, usually by the code that created the Deferred originally, the appropriate callbacks will be called. For example, the jqXHR object returned by jQuery.ajax()
is a Promise-compatible object and can be used this way:
diff --git a/pages/Types.html b/pages/Types.html
index 47f5ea74..5eb5eceb 100644
--- a/pages/Types.html
+++ b/pages/Types.html
@@ -93,6 +93,7 @@
jQuery
XMLHttpRequest
jqXHR
+ Thenable
Deferred Object
Promise Object
Callbacks Object
@@ -657,6 +658,8 @@ XMLHttpRequest
jqXHR
As of jQuery 1.5, the $.ajax() method returns the jqXHR object, which is a superset of the XMLHTTPRequest object. For more information, see the jqXHR section of the $.ajax entry
+Thenable
+Any object that has a then
method.
Deferred Object
As of jQuery 1.5, the Deferred object provides a way to register multiple callbacks into self-managed callback queues, invoke callback queues as appropriate, and relay the success or failure state of any synchronous or asynchronous function.
From 21c1fb1615c1de368ebf87dd418fa89395faf0c4 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Micha=C5=82=20Go=C5=82e=CC=A8biowski?=
Date: Mon, 20 Mar 2017 23:34:41 +0100
Subject: [PATCH 013/222] 1.12.24
---
package.json | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/package.json b/package.json
index 64b6253c..a43380ff 100644
--- a/package.json
+++ b/package.json
@@ -2,7 +2,7 @@
"name": "api.jquery.com",
"title": "jQuery API Docs",
"description": "API reference documentation for the jQuery JavaScript Library.",
- "version": "1.12.23",
+ "version": "1.12.24",
"homepage": "https://github.com/jquery/api.jquery.com",
"author": {
"name": "jQuery Foundation and other contributors"
From 65f99f984f2ab60b2ccd64f4024a6c641fc9a8c4 Mon Sep 17 00:00:00 2001
From: Timo Tijhof
Date: Wed, 22 Mar 2017 01:59:24 -0700
Subject: [PATCH 014/222] Selector: Move from global to instance property
category
Follows-up e3c9d15239, which added it to the wrong category.
Closes #1030
---
entries/selector.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/entries/selector.xml b/entries/selector.xml
index e9e61c1e..d64fc0aa 100644
--- a/entries/selector.xml
+++ b/entries/selector.xml
@@ -9,7 +9,7 @@
The .selector
property was deprecated in jQuery 1.7 and is only maintained to the extent needed for supporting .live()
in the jQuery Migrate plugin. It may be removed without notice in a future version. The property was never a reliable indicator of the selector that could be used to obtain the set of elements currently contained in the jQuery set where it was a property, since subsequent traversal methods may have changed the set. Plugins that need to use a selector string within their plugin can require it as a parameter of the method. For example, a "foo" plugin could be written as $.fn.foo = function( selector, options ) { /* plugin code goes here */ };
, and the person using the plugin would write $( "div.bar" ).foo( "div.bar", {dog: "bark"} );
with the "div.bar"
selector repeated as the first argument of .foo()
.
-
+
From 7f1299441cfe8afb1b829795abf7d16ecc0ae334 Mon Sep 17 00:00:00 2001
From: Timo Tijhof
Date: Wed, 22 Mar 2017 02:02:01 -0700
Subject: [PATCH 015/222] jQuery.ready: create page
Also categorise jQuery.holdReady in events/document-loading and
properties/global-jquery-object-properties, to match jQuery.ready.
Fixes #205
Closes #983
---
entries/jQuery.holdReady.xml | 2 ++
entries/jQuery.ready.xml | 36 ++++++++++++++++++++++++++++++++++++
2 files changed, 38 insertions(+)
create mode 100644 entries/jQuery.ready.xml
diff --git a/entries/jQuery.holdReady.xml b/entries/jQuery.holdReady.xml
index cb795f2f..016e951a 100644
--- a/entries/jQuery.holdReady.xml
+++ b/entries/jQuery.holdReady.xml
@@ -22,5 +22,7 @@ $.getScript( "myplugin.js", function() {
]]>
+
+
diff --git a/entries/jQuery.ready.xml b/entries/jQuery.ready.xml
new file mode 100644
index 00000000..cc1a98f1
--- /dev/null
+++ b/entries/jQuery.ready.xml
@@ -0,0 +1,36 @@
+
+
+ jQuery.ready
+ A Promise-like object (or "thenable") that resolves when the document is ready.
+
+ 1.8
+
+
+ As of jQuery 3.0, use of this object is supported via jQuery.when
or the native Promise.resolve()
. Code should not make assumptions about whether this object is a jQuery.Deferred
, native Promise, or some other type of promise object.
+ See also ready()
, which makes use of this.
+
+
+ Listen for document ready using jQuery.when
.
+
+
+
+ Typical usage involving another promise, using jQuery.when
.
+
+
+
+
+
+
+
From ca8f0526486bdfb9f746ce305563ded2a424465f Mon Sep 17 00:00:00 2001
From: Matt Flaschen
Date: Wed, 22 Mar 2017 05:02:52 -0400
Subject: [PATCH 016/222] Add the warning about deep=false to the short
description as well
Closes #1031
---
entries/jQuery.extend.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/entries/jQuery.extend.xml b/entries/jQuery.extend.xml
index ee6fb4a7..42edb4ae 100644
--- a/entries/jQuery.extend.xml
+++ b/entries/jQuery.extend.xml
@@ -16,7 +16,7 @@
1.1.4
- If true, the merge becomes recursive (aka. deep copy).
+ If true, the merge becomes recursive (aka. deep copy). Passing false
for this argument is not supported.
The object to extend. It will receive the new properties.
From 95dcca44d9e466b006d9884eb77f2881fc064954 Mon Sep 17 00:00:00 2001
From: eironman
Date: Wed, 21 Dec 2016 16:50:00 +0100
Subject: [PATCH 017/222] show: fix incorrect information related to !important
There was a contradiction between show() and css() documentation about
!important behaviour.
Closes #1015
---
entries/show.xml | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/entries/show.xml b/entries/show.xml
index fb150631..535b9c5d 100644
--- a/entries/show.xml
+++ b/entries/show.xml
@@ -32,10 +32,9 @@
$( ".target" ).show();
- The matched elements will be revealed immediately, with no animation. This is roughly equivalent to calling .css( "display", "block")
, except that the display
property is restored to whatever it was initially. If an element has a display
value of inline
, then is hidden and shown, it will once again be displayed inline
.
- Note: If using !important in your styles, such as
- display: none !important
,
- it is necessary to override the style using .css( "display", "block !important")
should you wish for .show()
to function correctly.
+ The matched elements will be revealed immediately, with no animation. This is roughly equivalent to calling .css( "display", "block" )
, except that the display
property is restored to whatever it was initially. If an element has a display
value of inline
, then is hidden and shown, it will once again be displayed inline
.
+ Note: If using !important in your styles, such as display: none !important
, .show()
will not override !important
.
+ It is recommended to use different classes with .addClass()
, .removeClass()
or .toggleClass()
. Another approach is using .attr( "style", "display: block !important;" )
; be careful, though, as it overwrites the style attribute of the element.
When a duration, a plain object, or a "complete" function is provided, .show()
becomes an animation method. The .show()
method animates the width, height, and opacity of the matched elements simultaneously.
Durations are given in milliseconds; higher values indicate slower animations, not faster ones. The strings 'fast'
and 'slow'
can be supplied to indicate durations of 200
and 600
milliseconds, respectively.
As of jQuery 1.4.3, an optional string naming an easing function may be used. Easing functions specify the speed at which the animation progresses at different points within the animation. The only easing implementations in the jQuery library are the default, called swing
, and one that progresses at a constant pace, called linear
. More easing functions are available with the use of plug-ins, most notably the jQuery UI suite.
From 90321abaeb410b79dd734b0cc7fe1c927d4e8204 Mon Sep 17 00:00:00 2001
From: Aurelio De Rosa
Date: Wed, 22 Mar 2017 14:45:55 +0000
Subject: [PATCH 018/222] outerHeight: Specified type of passed arguments to
callback
Fixes gh-989
Closes gh-1009
---
entries/outerHeight.xml | 8 +++++++-
entries/outerWidth.xml | 8 +++++++-
2 files changed, 14 insertions(+), 2 deletions(-)
diff --git a/entries/outerHeight.xml b/entries/outerHeight.xml
index c50dd23d..e1caaf55 100644
--- a/entries/outerHeight.xml
+++ b/entries/outerHeight.xml
@@ -56,7 +56,13 @@ $( "p:last" ).text(
1.8.0
-
+
+
+
+
+
+
+
A function returning the outer height to set. Receives the index position of the element in the set and the old outer height as arguments. Within the function, this
refers to the current element in the set.
diff --git a/entries/outerWidth.xml b/entries/outerWidth.xml
index bb37d571..4e613cc1 100644
--- a/entries/outerWidth.xml
+++ b/entries/outerWidth.xml
@@ -56,7 +56,13 @@ $( "p:last" ).text(
1.8.0
-
+
+
+
+
+
+
+
A function returning the outer width to set. Receives the index position of the element in the set and the old outer width as arguments. Within the function, this
refers to the current element in the set.
From 622c78ea4286bf8979f7fbded7a4c98ffa23c612 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Micha=C5=82=20Go=C5=82e=CC=A8biowski?=
Date: Wed, 22 Mar 2017 15:47:59 +0100
Subject: [PATCH 019/222] 1.12.25
---
package.json | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/package.json b/package.json
index a43380ff..82f32942 100644
--- a/package.json
+++ b/package.json
@@ -2,7 +2,7 @@
"name": "api.jquery.com",
"title": "jQuery API Docs",
"description": "API reference documentation for the jQuery JavaScript Library.",
- "version": "1.12.24",
+ "version": "1.12.25",
"homepage": "https://github.com/jquery/api.jquery.com",
"author": {
"name": "jQuery Foundation and other contributors"
From 06e4ce4d933c3456040669912e4b4164026a825c Mon Sep 17 00:00:00 2001
From: Jade Misenas
Date: Wed, 22 Mar 2017 17:41:35 -0400
Subject: [PATCH 020/222] one: indicate where passed data will be available
Closes #855
---
entries/one.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/entries/one.xml b/entries/one.xml
index 8d37f3f8..4b98e5f9 100644
--- a/entries/one.xml
+++ b/entries/one.xml
@@ -8,7 +8,7 @@
A string containing one or more JavaScript event types, such as "click" or "submit," or custom event names.
- An object containing data that will be passed to the event handler.
+ Data to be passed to the handler in event.data
when an event is triggered.
A function to execute at the time the event is triggered.
From 28884e399182f81ab3894b81eb0d95e15acfd0c1 Mon Sep 17 00:00:00 2001
From: Richard Gibson
Date: Tue, 25 Apr 2017 15:43:57 -0400
Subject: [PATCH 021/222] Offset: Be more precise about the origins for
.offset() and .position()
Ref https://github.com/jquery/jquery/pull/3487
Closes gh-1027
---
entries/offset.xml | 6 +++---
entries/position.xml | 4 ++--
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/entries/offset.xml b/entries/offset.xml
index e626ac5a..9a588ca2 100644
--- a/entries/offset.xml
+++ b/entries/offset.xml
@@ -8,10 +8,10 @@
Get the current coordinates of the first element in the set of matched elements, relative to the document.
- The .offset()
method allows us to retrieve the current position of an element relative to the document. Contrast this with .position()
, which retrieves the current position relative to the offset parent. When positioning a new element on top of an existing one for global manipulation (in particular, for implementing drag-and-drop), .offset()
is more useful.
+ The .offset()
method allows us to retrieve the current position of an element (specifically its border box, which excludes margins) relative to the document. Contrast this with .position()
, which retrieves the current position relative to the offset parent. When positioning a new element on top of an existing one for global manipulation (in particular, for implementing drag-and-drop), .offset()
is more useful.
.offset()
returns an object containing the properties top
and left
.
-
Note: jQuery does not support getting the offset coordinates of hidden elements or accounting for borders, margins, or padding set on the body element.
+
Note: jQuery does not support getting the offset coordinates of hidden elements or accounting for margins set on the <html>
document element.
While it is possible to get the coordinates of elements with visibility:hidden
set, display:none
is excluded from the rendering tree and thus has a position that is undefined.
@@ -96,7 +96,7 @@ $( "*", document.body ).click(function( event ) {
Set the current coordinates of every element in the set of matched elements, relative to the document.
- The .offset()
setter method allows us to reposition an element. The element's position is specified relative to the document. If the element's position
style property is currently static
, it will be set to relative
to allow for this repositioning.
+ The .offset()
setter method allows us to reposition an element. The element's border-box position is specified relative to the document. If the element's position
style property is currently static
, it will be set to relative
to allow for this repositioning.
Set the offset of the second paragraph:
diff --git a/entries/position.xml b/entries/position.xml
index 41bd0fb7..3eed46b4 100644
--- a/entries/position.xml
+++ b/entries/position.xml
@@ -6,10 +6,10 @@
Get the current coordinates of the first element in the set of matched elements, relative to the offset parent.
- The .position()
method allows us to retrieve the current position of an element relative to the offset parent. Contrast this with .offset()
, which retrieves the current position relative to the document. When positioning a new element near another one and within the same containing DOM element, .position()
is the more useful.
+ The .position()
method allows us to retrieve the current position of an element (specifically its margin box) relative to the offset parent (specifically its padding box, which excludes margins and borders). Contrast this with .offset()
, which retrieves the current position relative to the document. When positioning a new element near another one and within the same containing DOM element, .position()
is the more useful.
Returns an object containing the properties top
and left
.
-
Note: jQuery does not support getting the position coordinates of hidden elements or accounting for borders, margins, or padding set on the body element.
+
Note: jQuery does not support getting the position coordinates of hidden elements or accounting for margins set on the <html>
document element.
From c905b5169f4f9b2ade1172edb418a6c7ca738e00 Mon Sep 17 00:00:00 2001
From: Richard Gibson
Date: Tue, 25 Apr 2017 15:44:41 -0400
Subject: [PATCH 022/222] 1.12.26
---
package.json | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/package.json b/package.json
index 82f32942..ab9ac01c 100644
--- a/package.json
+++ b/package.json
@@ -2,7 +2,7 @@
"name": "api.jquery.com",
"title": "jQuery API Docs",
"description": "API reference documentation for the jQuery JavaScript Library.",
- "version": "1.12.25",
+ "version": "1.12.26",
"homepage": "https://github.com/jquery/api.jquery.com",
"author": {
"name": "jQuery Foundation and other contributors"
From c021b3efd9b8332aca6eaa8a65119dccd77e78eb Mon Sep 17 00:00:00 2001
From: Jack Alma
Date: Wed, 26 Jul 2017 02:58:05 -0600
Subject: [PATCH 023/222] mousedown: Fix a misplaced space
Closes #1051
---
entries/mousedown.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/entries/mousedown.xml b/entries/mousedown.xml
index dc1626fd..ea8d9a0e 100644
--- a/entries/mousedown.xml
+++ b/entries/mousedown.xml
@@ -54,7 +54,7 @@ $( "#other" ).click(function() {
});
After this code executes, clicks on Trigger the handler will also alert the message.
- The mousedown
event is sent when any mouse button is clicked. To act only on specific buttons, we can use the event object's which
property. Not all browsers support this property (Internet Explorer uses button instead), but jQuery normalizes the property so that it is safe to use in any browser. The value of which
will be 1 for the left button, 2 for the middle button, or 3 for the right button.
+ The mousedown
event is sent when any mouse button is clicked. To act only on specific buttons, we can use the event object's which
property. Not all browsers support this property (Internet Explorer uses button instead), but jQuery normalizes the property so that it is safe to use in any browser. The value of which
will be 1 for the left button, 2 for the middle button, or 3 for the right button.
This event is primarily useful for ensuring that the primary button was used to begin a drag operation; if ignored, strange results can occur when the user attempts to use a context menu. While the middle and right buttons can be detected with these properties, this is not reliable. In Opera and Safari, for example, right mouse button clicks are not detectable by default.
If the user clicks on an element, drags away from it, and releases the button, this is still counted as a mousedown
event. This sequence of actions is treated as a "canceling" of the button press in most user interfaces, so it is usually better to use the click
event unless we know that the mousedown
event is preferable for a particular situation.
From 8dabbaf7d382718827b10eedb61a7345d02a020c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Micha=C5=82=20Go=C5=82e=CC=A8biowski?=
Date: Wed, 26 Jul 2017 11:18:51 +0200
Subject: [PATCH 024/222] Build: Add a package-lock.json
---
package-lock.json | 666 ++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 666 insertions(+)
create mode 100644 package-lock.json
diff --git a/package-lock.json b/package-lock.json
new file mode 100644
index 00000000..2eaf2817
--- /dev/null
+++ b/package-lock.json
@@ -0,0 +1,666 @@
+{
+ "name": "api.jquery.com",
+ "version": "1.12.26",
+ "lockfileVersion": 1,
+ "requires": true,
+ "dependencies": {
+ "abbrev": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.0.tgz",
+ "integrity": "sha1-0FVMIlZjbi9W58LlrRg/hZQo2B8="
+ },
+ "argparse": {
+ "version": "0.1.16",
+ "resolved": "https://registry.npmjs.org/argparse/-/argparse-0.1.16.tgz",
+ "integrity": "sha1-z9AeD7uj1srtBJ+9dY1A9lGW9Xw=",
+ "requires": {
+ "underscore": "1.7.0",
+ "underscore.string": "2.4.0"
+ },
+ "dependencies": {
+ "underscore.string": {
+ "version": "2.4.0",
+ "resolved": "https://registry.npmjs.org/underscore.string/-/underscore.string-2.4.0.tgz",
+ "integrity": "sha1-jN2PusTi0uoefi6Al8QvRCKA+Fs="
+ }
+ }
+ },
+ "async": {
+ "version": "0.1.22",
+ "resolved": "https://registry.npmjs.org/async/-/async-0.1.22.tgz",
+ "integrity": "sha1-D8GqoIig4+8Ovi2IMbqw3PiEUGE="
+ },
+ "balanced-match": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz",
+ "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c="
+ },
+ "brace-expansion": {
+ "version": "1.1.8",
+ "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.8.tgz",
+ "integrity": "sha1-wHshHHyVLsH479Uad+8NHTmQopI=",
+ "requires": {
+ "balanced-match": "1.0.0",
+ "concat-map": "0.0.1"
+ }
+ },
+ "cheerio": {
+ "version": "0.17.0",
+ "resolved": "https://registry.npmjs.org/cheerio/-/cheerio-0.17.0.tgz",
+ "integrity": "sha1-+lrkLMYBIRM9KW0LRtmDIV9yaOo=",
+ "requires": {
+ "CSSselect": "0.4.1",
+ "dom-serializer": "0.0.1",
+ "entities": "1.1.1",
+ "htmlparser2": "3.7.3",
+ "lodash": "2.4.2"
+ },
+ "dependencies": {
+ "lodash": {
+ "version": "2.4.2",
+ "resolved": "https://registry.npmjs.org/lodash/-/lodash-2.4.2.tgz",
+ "integrity": "sha1-+t2DS5aDBz2hebPq5tnA0VBT9z4="
+ }
+ }
+ },
+ "coffee-script": {
+ "version": "1.3.3",
+ "resolved": "https://registry.npmjs.org/coffee-script/-/coffee-script-1.3.3.tgz",
+ "integrity": "sha1-FQ1rTLUiiUNp7+1qIQHCC8f0pPQ="
+ },
+ "colors": {
+ "version": "0.6.2",
+ "resolved": "https://registry.npmjs.org/colors/-/colors-0.6.2.tgz",
+ "integrity": "sha1-JCP+ZnisDF2uiFLl0OW+CMmXq8w="
+ },
+ "concat-map": {
+ "version": "0.0.1",
+ "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz",
+ "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s="
+ },
+ "core-util-is": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz",
+ "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac="
+ },
+ "CSSselect": {
+ "version": "0.4.1",
+ "resolved": "https://registry.npmjs.org/CSSselect/-/CSSselect-0.4.1.tgz",
+ "integrity": "sha1-+Kt+H4QYzmPNput713ioXX7EkrI=",
+ "requires": {
+ "CSSwhat": "0.4.7",
+ "domutils": "1.4.3"
+ }
+ },
+ "CSSwhat": {
+ "version": "0.4.7",
+ "resolved": "https://registry.npmjs.org/CSSwhat/-/CSSwhat-0.4.7.tgz",
+ "integrity": "sha1-hn2g/zn3eGEyQsRM/qg/CqTr35s="
+ },
+ "dateformat": {
+ "version": "1.0.2-1.2.3",
+ "resolved": "https://registry.npmjs.org/dateformat/-/dateformat-1.0.2-1.2.3.tgz",
+ "integrity": "sha1-sCIMAt6YYXQztyhRz0fePfLNvuk="
+ },
+ "dom-serializer": {
+ "version": "0.0.1",
+ "resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-0.0.1.tgz",
+ "integrity": "sha1-lYmCfx4y0iw3yCmtq9WbMkevjq8=",
+ "requires": {
+ "domelementtype": "1.1.3",
+ "entities": "1.1.1"
+ },
+ "dependencies": {
+ "domelementtype": {
+ "version": "1.1.3",
+ "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-1.1.3.tgz",
+ "integrity": "sha1-vSh3PiZCiBrsUVRJJCmcXNgiGFs="
+ }
+ }
+ },
+ "domelementtype": {
+ "version": "1.3.0",
+ "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-1.3.0.tgz",
+ "integrity": "sha1-sXrtguirWeUt2cGbF1bg/BhyBMI="
+ },
+ "domhandler": {
+ "version": "2.2.1",
+ "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-2.2.1.tgz",
+ "integrity": "sha1-Wd+dzSJ+gIs2Wuc+H2aErD2Ub8I=",
+ "requires": {
+ "domelementtype": "1.3.0"
+ }
+ },
+ "domutils": {
+ "version": "1.4.3",
+ "resolved": "https://registry.npmjs.org/domutils/-/domutils-1.4.3.tgz",
+ "integrity": "sha1-CGVRN5bGswYDGFDhdVFrr4C3Km8=",
+ "requires": {
+ "domelementtype": "1.3.0"
+ }
+ },
+ "entities": {
+ "version": "1.1.1",
+ "resolved": "https://registry.npmjs.org/entities/-/entities-1.1.1.tgz",
+ "integrity": "sha1-blwtClYhtdra7O+AuQ7ftc13cvA="
+ },
+ "esprima": {
+ "version": "1.0.4",
+ "resolved": "https://registry.npmjs.org/esprima/-/esprima-1.0.4.tgz",
+ "integrity": "sha1-n1V+CPw7TSbs6d00+Pv0drYlha0="
+ },
+ "eventemitter2": {
+ "version": "0.4.14",
+ "resolved": "https://registry.npmjs.org/eventemitter2/-/eventemitter2-0.4.14.tgz",
+ "integrity": "sha1-j2G3XN4BKy6esoTUVFWDtWQ7Yas="
+ },
+ "exit": {
+ "version": "0.1.2",
+ "resolved": "https://registry.npmjs.org/exit/-/exit-0.1.2.tgz",
+ "integrity": "sha1-BjJjj42HfMghB9MKD/8aF8uhzQw="
+ },
+ "findup-sync": {
+ "version": "0.1.3",
+ "resolved": "https://registry.npmjs.org/findup-sync/-/findup-sync-0.1.3.tgz",
+ "integrity": "sha1-fz56l7gjksZTvwZYm9hRkOk8NoM=",
+ "requires": {
+ "glob": "3.2.11",
+ "lodash": "2.4.2"
+ },
+ "dependencies": {
+ "glob": {
+ "version": "3.2.11",
+ "resolved": "https://registry.npmjs.org/glob/-/glob-3.2.11.tgz",
+ "integrity": "sha1-Spc/Y1uRkPcV0QmH1cAP0oFevj0=",
+ "requires": {
+ "inherits": "2.0.3",
+ "minimatch": "0.3.0"
+ }
+ },
+ "lodash": {
+ "version": "2.4.2",
+ "resolved": "https://registry.npmjs.org/lodash/-/lodash-2.4.2.tgz",
+ "integrity": "sha1-+t2DS5aDBz2hebPq5tnA0VBT9z4="
+ },
+ "minimatch": {
+ "version": "0.3.0",
+ "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-0.3.0.tgz",
+ "integrity": "sha1-J12O2qxPG7MyZHIInnlJyDlGmd0=",
+ "requires": {
+ "lru-cache": "2.7.3",
+ "sigmund": "1.0.1"
+ }
+ }
+ }
+ },
+ "getobject": {
+ "version": "0.1.0",
+ "resolved": "https://registry.npmjs.org/getobject/-/getobject-0.1.0.tgz",
+ "integrity": "sha1-BHpEl4n6Fg0Bj1SG7ZEyC27HiFw="
+ },
+ "gilded-wordpress": {
+ "version": "1.0.3",
+ "resolved": "https://registry.npmjs.org/gilded-wordpress/-/gilded-wordpress-1.0.3.tgz",
+ "integrity": "sha1-kh/iJ93yWyxAgp5QUjsOMXRDsz4=",
+ "requires": {
+ "async": "0.9.2",
+ "glob": "4.0.6",
+ "wordpress": "1.1.2"
+ },
+ "dependencies": {
+ "async": {
+ "version": "0.9.2",
+ "resolved": "https://registry.npmjs.org/async/-/async-0.9.2.tgz",
+ "integrity": "sha1-rqdNXmHB+JlhO/ZL2mbUx48v0X0="
+ },
+ "glob": {
+ "version": "4.0.6",
+ "resolved": "https://registry.npmjs.org/glob/-/glob-4.0.6.tgz",
+ "integrity": "sha1-aVxQvdTi+1xdNwsJHziNNwfikac=",
+ "requires": {
+ "graceful-fs": "3.0.11",
+ "inherits": "2.0.3",
+ "minimatch": "1.0.0",
+ "once": "1.4.0"
+ }
+ },
+ "graceful-fs": {
+ "version": "3.0.11",
+ "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-3.0.11.tgz",
+ "integrity": "sha1-dhPHeKGv6mLyXGMKCG1/Osu92Bg=",
+ "requires": {
+ "natives": "1.1.0"
+ }
+ },
+ "minimatch": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-1.0.0.tgz",
+ "integrity": "sha1-4N0hILSeG3JM6NcUxSCCKpQ4V20=",
+ "requires": {
+ "lru-cache": "2.7.3",
+ "sigmund": "1.0.1"
+ }
+ }
+ }
+ },
+ "glob": {
+ "version": "3.1.21",
+ "resolved": "https://registry.npmjs.org/glob/-/glob-3.1.21.tgz",
+ "integrity": "sha1-0p4KBV3qUTj00H7UDomC6DwgZs0=",
+ "requires": {
+ "graceful-fs": "1.2.3",
+ "inherits": "1.0.2",
+ "minimatch": "0.2.14"
+ },
+ "dependencies": {
+ "inherits": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/inherits/-/inherits-1.0.2.tgz",
+ "integrity": "sha1-ykMJ2t7mtUzAuNJH6NfHoJdb3Js="
+ }
+ }
+ },
+ "graceful-fs": {
+ "version": "1.2.3",
+ "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-1.2.3.tgz",
+ "integrity": "sha1-FaSAaldUfLLS2/J/QuiajDRRs2Q="
+ },
+ "grunt": {
+ "version": "0.4.5",
+ "resolved": "https://registry.npmjs.org/grunt/-/grunt-0.4.5.tgz",
+ "integrity": "sha1-VpN81RlDJK3/bSB2MYMqnWuk5/A=",
+ "requires": {
+ "async": "0.1.22",
+ "coffee-script": "1.3.3",
+ "colors": "0.6.2",
+ "dateformat": "1.0.2-1.2.3",
+ "eventemitter2": "0.4.14",
+ "exit": "0.1.2",
+ "findup-sync": "0.1.3",
+ "getobject": "0.1.0",
+ "glob": "3.1.21",
+ "grunt-legacy-log": "0.1.3",
+ "grunt-legacy-util": "0.2.0",
+ "hooker": "0.2.3",
+ "iconv-lite": "0.2.11",
+ "js-yaml": "2.0.5",
+ "lodash": "0.9.2",
+ "minimatch": "0.2.14",
+ "nopt": "1.0.10",
+ "rimraf": "2.2.8",
+ "underscore.string": "2.2.1",
+ "which": "1.0.9"
+ }
+ },
+ "grunt-check-modules": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/grunt-check-modules/-/grunt-check-modules-1.0.0.tgz",
+ "integrity": "sha1-Y/9erkYTF5tKifaozTcfekAfd4I="
+ },
+ "grunt-cli": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/grunt-cli/-/grunt-cli-1.1.0.tgz",
+ "integrity": "sha1-r9eWmTTd8zYg6ER+3B+pTlHlWjQ=",
+ "requires": {
+ "findup-sync": "0.3.0",
+ "nopt": "3.0.6",
+ "resolve": "1.1.7"
+ },
+ "dependencies": {
+ "findup-sync": {
+ "version": "0.3.0",
+ "resolved": "https://registry.npmjs.org/findup-sync/-/findup-sync-0.3.0.tgz",
+ "integrity": "sha1-N5MKpdgWt3fANEXhlmzGeQpMCxY=",
+ "requires": {
+ "glob": "5.0.15"
+ }
+ },
+ "glob": {
+ "version": "5.0.15",
+ "resolved": "https://registry.npmjs.org/glob/-/glob-5.0.15.tgz",
+ "integrity": "sha1-G8k2ueAvSmA/zCIuz3Yz0wuLk7E=",
+ "requires": {
+ "inflight": "1.0.6",
+ "inherits": "2.0.3",
+ "minimatch": "3.0.4",
+ "once": "1.4.0",
+ "path-is-absolute": "1.0.1"
+ }
+ },
+ "minimatch": {
+ "version": "3.0.4",
+ "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz",
+ "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==",
+ "requires": {
+ "brace-expansion": "1.1.8"
+ }
+ },
+ "nopt": {
+ "version": "3.0.6",
+ "resolved": "https://registry.npmjs.org/nopt/-/nopt-3.0.6.tgz",
+ "integrity": "sha1-xkZdvwirzU2zWTF/eaxopkayj/k=",
+ "requires": {
+ "abbrev": "1.1.0"
+ }
+ }
+ }
+ },
+ "grunt-jquery-content": {
+ "version": "3.0.1",
+ "resolved": "https://registry.npmjs.org/grunt-jquery-content/-/grunt-jquery-content-3.0.1.tgz",
+ "integrity": "sha1-aHdrx0G1SVEdaPBouVCsizd+g90=",
+ "requires": {
+ "async": "0.9.0",
+ "cheerio": "0.17.0",
+ "grunt-check-modules": "1.0.0",
+ "grunt-wordpress": "2.1.2",
+ "he": "0.5.0",
+ "highlight.js": "7.3.0",
+ "marked": "0.3.2",
+ "rimraf": "2.2.8",
+ "spawnback": "1.0.0",
+ "which": "1.0.5",
+ "wordpress": "1.1.2"
+ },
+ "dependencies": {
+ "async": {
+ "version": "0.9.0",
+ "resolved": "https://registry.npmjs.org/async/-/async-0.9.0.tgz",
+ "integrity": "sha1-rDYTsdqb7RtHUQu0ZRuJMeRxRsc="
+ },
+ "which": {
+ "version": "1.0.5",
+ "resolved": "https://registry.npmjs.org/which/-/which-1.0.5.tgz",
+ "integrity": "sha1-VjDWgZ3aaS8UZEYueVbLQsCEJzk="
+ }
+ }
+ },
+ "grunt-legacy-log": {
+ "version": "0.1.3",
+ "resolved": "https://registry.npmjs.org/grunt-legacy-log/-/grunt-legacy-log-0.1.3.tgz",
+ "integrity": "sha1-7ClCboAwIa9ZAp+H0vnNczWgVTE=",
+ "requires": {
+ "colors": "0.6.2",
+ "grunt-legacy-log-utils": "0.1.1",
+ "hooker": "0.2.3",
+ "lodash": "2.4.2",
+ "underscore.string": "2.3.3"
+ },
+ "dependencies": {
+ "lodash": {
+ "version": "2.4.2",
+ "resolved": "https://registry.npmjs.org/lodash/-/lodash-2.4.2.tgz",
+ "integrity": "sha1-+t2DS5aDBz2hebPq5tnA0VBT9z4="
+ },
+ "underscore.string": {
+ "version": "2.3.3",
+ "resolved": "https://registry.npmjs.org/underscore.string/-/underscore.string-2.3.3.tgz",
+ "integrity": "sha1-ccCL9rQosRM/N+ePo6Icgvcymw0="
+ }
+ }
+ },
+ "grunt-legacy-log-utils": {
+ "version": "0.1.1",
+ "resolved": "https://registry.npmjs.org/grunt-legacy-log-utils/-/grunt-legacy-log-utils-0.1.1.tgz",
+ "integrity": "sha1-wHBrndkGThFvNvI/5OawSGcsD34=",
+ "requires": {
+ "colors": "0.6.2",
+ "lodash": "2.4.2",
+ "underscore.string": "2.3.3"
+ },
+ "dependencies": {
+ "lodash": {
+ "version": "2.4.2",
+ "resolved": "https://registry.npmjs.org/lodash/-/lodash-2.4.2.tgz",
+ "integrity": "sha1-+t2DS5aDBz2hebPq5tnA0VBT9z4="
+ },
+ "underscore.string": {
+ "version": "2.3.3",
+ "resolved": "https://registry.npmjs.org/underscore.string/-/underscore.string-2.3.3.tgz",
+ "integrity": "sha1-ccCL9rQosRM/N+ePo6Icgvcymw0="
+ }
+ }
+ },
+ "grunt-legacy-util": {
+ "version": "0.2.0",
+ "resolved": "https://registry.npmjs.org/grunt-legacy-util/-/grunt-legacy-util-0.2.0.tgz",
+ "integrity": "sha1-kzJIhNv343qf98Am3/RR2UqeVUs=",
+ "requires": {
+ "async": "0.1.22",
+ "exit": "0.1.2",
+ "getobject": "0.1.0",
+ "hooker": "0.2.3",
+ "lodash": "0.9.2",
+ "underscore.string": "2.2.1",
+ "which": "1.0.9"
+ }
+ },
+ "grunt-wordpress": {
+ "version": "2.1.2",
+ "resolved": "https://registry.npmjs.org/grunt-wordpress/-/grunt-wordpress-2.1.2.tgz",
+ "integrity": "sha1-ue3Lv5jp6HM9F6gsMmWf2zbO2LE=",
+ "requires": {
+ "gilded-wordpress": "1.0.3"
+ }
+ },
+ "he": {
+ "version": "0.5.0",
+ "resolved": "https://registry.npmjs.org/he/-/he-0.5.0.tgz",
+ "integrity": "sha1-LAX/rvkLaOhg8/0rVO9YCYknfuI="
+ },
+ "highlight.js": {
+ "version": "7.3.0",
+ "resolved": "https://registry.npmjs.org/highlight.js/-/highlight.js-7.3.0.tgz",
+ "integrity": "sha1-bF8PZOcHj2ZAK82/yJEQw/0bqZ8="
+ },
+ "hooker": {
+ "version": "0.2.3",
+ "resolved": "https://registry.npmjs.org/hooker/-/hooker-0.2.3.tgz",
+ "integrity": "sha1-uDT3I8xKJCqmWWNFnfbZhMXT2Vk="
+ },
+ "htmlparser2": {
+ "version": "3.7.3",
+ "resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-3.7.3.tgz",
+ "integrity": "sha1-amTHdjfAjG8w7CqBV6UzM758sF4=",
+ "requires": {
+ "domelementtype": "1.3.0",
+ "domhandler": "2.2.1",
+ "domutils": "1.5.1",
+ "entities": "1.0.0",
+ "readable-stream": "1.1.14"
+ },
+ "dependencies": {
+ "domutils": {
+ "version": "1.5.1",
+ "resolved": "https://registry.npmjs.org/domutils/-/domutils-1.5.1.tgz",
+ "integrity": "sha1-3NhIiib1Y9YQeeSMn3t+Mjc2gs8=",
+ "requires": {
+ "dom-serializer": "0.0.1",
+ "domelementtype": "1.3.0"
+ }
+ },
+ "entities": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/entities/-/entities-1.0.0.tgz",
+ "integrity": "sha1-sph6o4ITR/zeZCsk/fyeT7cSvyY="
+ }
+ }
+ },
+ "iconv-lite": {
+ "version": "0.2.11",
+ "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.2.11.tgz",
+ "integrity": "sha1-HOYKOleGSiktEyH/RgnKS7llrcg="
+ },
+ "inflight": {
+ "version": "1.0.6",
+ "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz",
+ "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=",
+ "requires": {
+ "once": "1.4.0",
+ "wrappy": "1.0.2"
+ }
+ },
+ "inherits": {
+ "version": "2.0.3",
+ "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz",
+ "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4="
+ },
+ "isarray": {
+ "version": "0.0.1",
+ "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz",
+ "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8="
+ },
+ "js-yaml": {
+ "version": "2.0.5",
+ "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-2.0.5.tgz",
+ "integrity": "sha1-olrmUJmZ6X3yeMZxnaEb0Gh3Q6g=",
+ "requires": {
+ "argparse": "0.1.16",
+ "esprima": "1.0.4"
+ }
+ },
+ "lodash": {
+ "version": "0.9.2",
+ "resolved": "https://registry.npmjs.org/lodash/-/lodash-0.9.2.tgz",
+ "integrity": "sha1-jzSZxSRdNG1oLlsNO0B2fgnxqSw="
+ },
+ "lru-cache": {
+ "version": "2.7.3",
+ "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-2.7.3.tgz",
+ "integrity": "sha1-bUUk6LlV+V1PW1iFHOId1y+06VI="
+ },
+ "marked": {
+ "version": "0.3.2",
+ "resolved": "https://registry.npmjs.org/marked/-/marked-0.3.2.tgz",
+ "integrity": "sha1-AV2xWIZEOPJKZL3WGgQotBhwbQk="
+ },
+ "minimatch": {
+ "version": "0.2.14",
+ "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-0.2.14.tgz",
+ "integrity": "sha1-x054BXT2PG+aCQ6Q775u9TpqdWo=",
+ "requires": {
+ "lru-cache": "2.7.3",
+ "sigmund": "1.0.1"
+ }
+ },
+ "natives": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/natives/-/natives-1.1.0.tgz",
+ "integrity": "sha1-6f+EFBimsux6SV6TmYT3jxY+bjE="
+ },
+ "nopt": {
+ "version": "1.0.10",
+ "resolved": "https://registry.npmjs.org/nopt/-/nopt-1.0.10.tgz",
+ "integrity": "sha1-bd0hvSoxQXuScn3Vhfim83YI6+4=",
+ "requires": {
+ "abbrev": "1.1.0"
+ }
+ },
+ "once": {
+ "version": "1.4.0",
+ "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz",
+ "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=",
+ "requires": {
+ "wrappy": "1.0.2"
+ }
+ },
+ "path-is-absolute": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz",
+ "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18="
+ },
+ "readable-stream": {
+ "version": "1.1.14",
+ "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz",
+ "integrity": "sha1-fPTFTvZI44EwhMY23SB54WbAgdk=",
+ "requires": {
+ "core-util-is": "1.0.2",
+ "inherits": "2.0.3",
+ "isarray": "0.0.1",
+ "string_decoder": "0.10.31"
+ }
+ },
+ "resolve": {
+ "version": "1.1.7",
+ "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.1.7.tgz",
+ "integrity": "sha1-IDEU2CrSxe2ejgQRs5ModeiJ6Xs="
+ },
+ "rimraf": {
+ "version": "2.2.8",
+ "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.2.8.tgz",
+ "integrity": "sha1-5Dm+Kq7jJzIZUnMPmaiSnk/FBYI="
+ },
+ "sax": {
+ "version": "0.6.1",
+ "resolved": "https://registry.npmjs.org/sax/-/sax-0.6.1.tgz",
+ "integrity": "sha1-VjsZx8HeiS4Jv8Ty/DDjwn8JUrk="
+ },
+ "sigmund": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/sigmund/-/sigmund-1.0.1.tgz",
+ "integrity": "sha1-P/IfGYytIXX587eBhT/ZTQ0ZtZA="
+ },
+ "spawnback": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/spawnback/-/spawnback-1.0.0.tgz",
+ "integrity": "sha1-9zZi9+VNlTZ+ynTWQmxnfdfqaG8="
+ },
+ "string_decoder": {
+ "version": "0.10.31",
+ "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz",
+ "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ="
+ },
+ "underscore": {
+ "version": "1.7.0",
+ "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.7.0.tgz",
+ "integrity": "sha1-a7rwh3UA02vjTsqlhODbn+8DUgk="
+ },
+ "underscore.string": {
+ "version": "2.2.1",
+ "resolved": "https://registry.npmjs.org/underscore.string/-/underscore.string-2.2.1.tgz",
+ "integrity": "sha1-18D6KvXVoaZ/QlPa7pgTLnM/Dxk="
+ },
+ "which": {
+ "version": "1.0.9",
+ "resolved": "https://registry.npmjs.org/which/-/which-1.0.9.tgz",
+ "integrity": "sha1-RgwdoPgQED0DIam2M6+eV15kSG8="
+ },
+ "wordpress": {
+ "version": "1.1.2",
+ "resolved": "https://registry.npmjs.org/wordpress/-/wordpress-1.1.2.tgz",
+ "integrity": "sha1-uDZhhSBVSXESG8VsQ7A5yzgg94M=",
+ "requires": {
+ "xmlrpc": "1.3.1"
+ }
+ },
+ "wrappy": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz",
+ "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8="
+ },
+ "xmlbuilder": {
+ "version": "2.6.5",
+ "resolved": "https://registry.npmjs.org/xmlbuilder/-/xmlbuilder-2.6.5.tgz",
+ "integrity": "sha1-b/etYPty0idk8AehZLd/K/FABSY=",
+ "requires": {
+ "lodash": "3.10.1"
+ },
+ "dependencies": {
+ "lodash": {
+ "version": "3.10.1",
+ "resolved": "https://registry.npmjs.org/lodash/-/lodash-3.10.1.tgz",
+ "integrity": "sha1-W/Rejkm6QYnhfUgnid/RW9FAt7Y="
+ }
+ }
+ },
+ "xmlrpc": {
+ "version": "1.3.1",
+ "resolved": "https://registry.npmjs.org/xmlrpc/-/xmlrpc-1.3.1.tgz",
+ "integrity": "sha1-OqWCCG/vUwz+Hc2qDEyd3F0ORFE=",
+ "requires": {
+ "sax": "0.6.1",
+ "xmlbuilder": "2.6.5"
+ }
+ }
+ }
+}
From e0a236becabfd660f656ef74d0abb16a38efe8cc Mon Sep 17 00:00:00 2001
From: Levi Robertson
Date: Wed, 26 Jul 2017 02:31:09 -0700
Subject: [PATCH 025/222] closest: Correct spelling of "highlight"
Closes #1045
---
entries/closest.xml | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/entries/closest.xml b/entries/closest.xml
index 14c10a80..903ba1a7 100644
--- a/entries/closest.xml
+++ b/entries/closest.xml
@@ -109,7 +109,7 @@ $( "li.item-a" )
Show how event delegation can be done with closest. The closest list element toggles a yellow background when it or its descendent is clicked.
@@ -134,7 +134,7 @@ $( document ).on( "click", function( event ) {
From 39e4bf4dcf4060eec4e4a12739d50713c6c7b16a Mon Sep 17 00:00:00 2001
From: Dasheng Jonathan Zhang
Date: Wed, 26 Jul 2017 05:32:58 -0400
Subject: [PATCH 026/222] stop: fix misplaced default value
Closes #1037
---
entries/stop.xml | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/entries/stop.xml b/entries/stop.xml
index b66c0bcc..c0f17348 100644
--- a/entries/stop.xml
+++ b/entries/stop.xml
@@ -13,10 +13,10 @@
1.7
-
+
The name of the queue in which to stop animations.
-
+
A Boolean indicating whether to remove queued animation as well. Defaults to false
.
From 5b7121ab1a7d2a1805e702eca20da180e336528c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Micha=C5=82=20Go=C5=82e=CC=A8biowski?=
Date: Wed, 26 Jul 2017 11:54:49 +0200
Subject: [PATCH 027/222] 1.12.27
---
package-lock.json | 2 +-
package.json | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/package-lock.json b/package-lock.json
index 2eaf2817..d3c03011 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -1,6 +1,6 @@
{
"name": "api.jquery.com",
- "version": "1.12.26",
+ "version": "1.12.27",
"lockfileVersion": 1,
"requires": true,
"dependencies": {
diff --git a/package.json b/package.json
index ab9ac01c..6a5ba757 100644
--- a/package.json
+++ b/package.json
@@ -2,7 +2,7 @@
"name": "api.jquery.com",
"title": "jQuery API Docs",
"description": "API reference documentation for the jQuery JavaScript Library.",
- "version": "1.12.26",
+ "version": "1.12.27",
"homepage": "https://github.com/jquery/api.jquery.com",
"author": {
"name": "jQuery Foundation and other contributors"
From 9b33cd476b8c94378a672cac9e4efde7c16d1eca Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Micha=C5=82=20Go=C5=82e=CC=A8biowski-Owczarek?=
Date: Wed, 11 Oct 2017 10:59:26 +0200
Subject: [PATCH 028/222] Add my new name to .mailmap
---
.mailmap | 1 +
1 file changed, 1 insertion(+)
diff --git a/.mailmap b/.mailmap
index 175ab74f..7f902dbd 100644
--- a/.mailmap
+++ b/.mailmap
@@ -1 +1,2 @@
Matic Potočnik
+Michał Gołębiowski-Owczarek
From 0c56670f38fd4e28f1f217e7fbe7de92849e0df9 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?B=C3=A1lint=20Kov=C3=A1cs?=
Date: Wed, 22 Nov 2017 04:00:12 +0000
Subject: [PATCH 029/222] callbacks.fireWith: Update text and add value type
information
Fixes gh-1066
Closes gh-1067
---
entries/callbacks.fireWith.xml | 6 +++---
entries/event.stopImmediatePropagation.xml | 2 +-
entries/event.stopPropagation.xml | 2 +-
entries/jQuery.ajaxSetup.xml | 2 +-
entries/jQuery.globalEval.xml | 2 +-
5 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/entries/callbacks.fireWith.xml b/entries/callbacks.fireWith.xml
index dfb2adb3..7527e182 100644
--- a/entries/callbacks.fireWith.xml
+++ b/entries/callbacks.fireWith.xml
@@ -3,11 +3,11 @@
callbacks.fireWith()
1.7
-
+
A reference to the context in which the callbacks in the list should be fired.
-
- An argument, or array of arguments, to pass to the callbacks in the list.
+
+ An array or array-like object of arguments to pass to the callbacks in the list. If omitted or undefined, no arguments will be passed.
Call all callbacks in a list with the given context and arguments.
diff --git a/entries/event.stopImmediatePropagation.xml b/entries/event.stopImmediatePropagation.xml
index b067e43a..e5b53eba 100644
--- a/entries/event.stopImmediatePropagation.xml
+++ b/entries/event.stopImmediatePropagation.xml
@@ -1,5 +1,5 @@
-
+
event.stopImmediatePropagation()
1.3
diff --git a/entries/event.stopPropagation.xml b/entries/event.stopPropagation.xml
index adf4ea10..8d34bd4d 100644
--- a/entries/event.stopPropagation.xml
+++ b/entries/event.stopPropagation.xml
@@ -1,5 +1,5 @@
-
+
event.stopPropagation()
1.0
diff --git a/entries/jQuery.ajaxSetup.xml b/entries/jQuery.ajaxSetup.xml
index d9589e3a..d175c54a 100644
--- a/entries/jQuery.ajaxSetup.xml
+++ b/entries/jQuery.ajaxSetup.xml
@@ -1,5 +1,5 @@
-
+
jQuery.ajaxSetup()
1.1
diff --git a/entries/jQuery.globalEval.xml b/entries/jQuery.globalEval.xml
index ce510fe3..ad6b7d1e 100644
--- a/entries/jQuery.globalEval.xml
+++ b/entries/jQuery.globalEval.xml
@@ -1,5 +1,5 @@
-
+
jQuery.globalEval()
1.0.4
From b82f48de332840e347d723d269f2943d4ccebda0 Mon Sep 17 00:00:00 2001
From: Richard Gibson
Date: Tue, 21 Nov 2017 23:01:41 -0500
Subject: [PATCH 030/222] 1.12.28
---
package.json | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/package.json b/package.json
index 6a5ba757..d388b15a 100644
--- a/package.json
+++ b/package.json
@@ -2,7 +2,7 @@
"name": "api.jquery.com",
"title": "jQuery API Docs",
"description": "API reference documentation for the jQuery JavaScript Library.",
- "version": "1.12.27",
+ "version": "1.12.28",
"homepage": "https://github.com/jquery/api.jquery.com",
"author": {
"name": "jQuery Foundation and other contributors"
From 576a64b8f5986bb6a447e6f98764a80a152e06fb Mon Sep 17 00:00:00 2001
From: Michael Welling
Date: Mon, 11 Dec 2017 14:58:38 -0500
Subject: [PATCH 031/222] unwrap: Update description to include return value
information
The `.unwrap()` method returns whatever content was unwrapped. Adding this to the description so that the behavior is documented.
Closes gh-1071
---
entries/unwrap.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/entries/unwrap.xml b/entries/unwrap.xml
index d3a7b405..ff6d6100 100644
--- a/entries/unwrap.xml
+++ b/entries/unwrap.xml
@@ -12,7 +12,7 @@
Remove the parents of the set of matched elements from the DOM, leaving the matched elements in their place.
- The .unwrap()
method removes the element's parent. This is effectively the inverse of the .wrap()
method. The matched elements (and their siblings, if any) replace their parents within the DOM structure.
+ The .unwrap()
method removes the element's parent and returns the unwrapped content. This is effectively the inverse of the .wrap()
method. The matched elements (and their siblings, if any) replace their parents within the DOM structure.
Wrap/unwrap a div around each of the paragraphs.
From e50c07016b42a76103927c2d5f8dba84c553861d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Micha=C5=82=20Go=C5=82e=CC=A8biowski-Owczarek?=
Date: Wed, 6 Dec 2017 19:40:51 +0100
Subject: [PATCH 032/222] jQuery.cssHooks: remove the "O" Opera prefix
jQuery 3.0+ doesn't support Opera Presto (versions <=12.x) so including its
prefix in the docs doesn't make much sense.
Closes gh-1069
---
entries/jQuery.cssHooks.xml | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/entries/jQuery.cssHooks.xml b/entries/jQuery.cssHooks.xml
index f7ecb170..19bb9054 100644
--- a/entries/jQuery.cssHooks.xml
+++ b/entries/jQuery.cssHooks.xml
@@ -45,7 +45,7 @@ function styleSupport( prop ) {
// Capitalize first character of the prop to test vendor prefix
capProp = prop.charAt( 0 ).toUpperCase() + prop.slice( 1 ),
- prefixes = [ "Moz", "Webkit", "O", "ms" ],
+ prefixes = [ "Moz", "Webkit", "ms" ],
div = document.createElement( "div" );
if ( prop in div.style ) {
@@ -89,7 +89,7 @@ if ( !$.cssHooks ) {
function styleSupport( prop ) {
var vendorProp, supportedProp,
capProp = prop.charAt( 0 ).toUpperCase() + prop.slice( 1 ),
- prefixes = [ "Moz", "Webkit", "O", "ms" ],
+ prefixes = [ "Moz", "Webkit", "ms" ],
div = document.createElement( "div" );
if ( prop in div.style ) {
From 7a6ba164ee16317b375d2bfb59b025b13cf273a1 Mon Sep 17 00:00:00 2001
From: Wolfgang Hochleitner
Date: Tue, 13 Jun 2017 11:38:15 +0200
Subject: [PATCH 033/222] Types: Updated XMLHttpRequest standard link
W3C's XMLHttpRequest standardization process has been discontinued.
Documentation now refers to the WHATWG living standard.
Closes gh-1046
Fixes gh-1043
---
pages/Types.html | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/pages/Types.html b/pages/Types.html
index 5eb5eceb..b31c47ee 100644
--- a/pages/Types.html
+++ b/pages/Types.html
@@ -645,9 +645,9 @@ jQuery
XMLHttpRequest
Some of jQuery's Ajax functions return the native XMLHttpRequest (XHR) object, or pass it as an argument to success/error/complete handlers, so that you can do additional processing or monitoring on the request. Note that Ajax functions only return or pass an XHR object when an XHR object is actually used in the request. For example, JSONP requests and cross-domain GET requests use a script element rather than an XHR object.
-Although the XHR object is a standard, there are variations in its behavior on different browsers. Refer to the W3C site and browsers' documentation for more information:
+
Although the XHR object is a standard, there are variations in its behavior on different browsers. Refer to the WHATWG site and browsers' documentation for more information:
-- W3C standard
+
- WHATWG living standard
- Apple (Safari)
- Mozilla (Firefox)
- Microsoft (Internet Explorer)
From db4ca52993c19a3ab5ef7481252db88e2843f750 Mon Sep 17 00:00:00 2001
From: Herst
Date: Mon, 6 Nov 2017 14:10:42 +0100
Subject: [PATCH 034/222] contextmenu: Menu button trigger not just on root
Closes gh-1065
---
entries/contextmenu.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/entries/contextmenu.xml b/entries/contextmenu.xml
index 0c846169..a3645ef7 100644
--- a/entries/contextmenu.xml
+++ b/entries/contextmenu.xml
@@ -24,7 +24,7 @@
This method is a shortcut for .on( "contextmenu", handler )
in the first two variations, and .trigger( "contextmenu" )
in the third.
- The contextmenu
event is sent to an element when the right button of the mouse is clicked on it, but before the context menu is displayed. In case the context menu key is pressed, the event is triggered on the html
element. Any HTML element can receive this event.
+ The contextmenu
event is sent to an element when the right button of the mouse is clicked on it, but before the context menu is displayed. In case the context menu key is pressed, the event is triggered on the html
element or the currently focused element. Any HTML element can receive this event.
For example, consider the HTML:
<div id="target">
From 5d32df8c1c8db2bdf023895155f7f9c58966f3ec Mon Sep 17 00:00:00 2001
From: Richard Gibson
Date: Mon, 29 Jan 2018 22:12:31 -0500
Subject: [PATCH 035/222] jQuery.isFunction: Resolve ambiguity about what is
being tested
Closes gh-1079
Fixes gh-1034
---
entries/jQuery.isFunction.xml | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/entries/jQuery.isFunction.xml b/entries/jQuery.isFunction.xml
index 689cdbf7..349061ef 100644
--- a/entries/jQuery.isFunction.xml
+++ b/entries/jQuery.isFunction.xml
@@ -3,11 +3,11 @@
jQuery.isFunction()
1.2
-
- Object to test whether or not it is a function.
+
+ The value to be tested.
- Determine if the argument passed is a JavaScript function object.
+ Determines if its argument is callable as a function.
Note: As of jQuery 1.3, functions provided by the browser like alert()
and DOM element methods like getAttribute()
are not guaranteed to be detected as functions in browsers such as Internet Explorer.
From 82322be998f07ee7e95f9c691dfa00d0591526bc Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Micha=C5=82=20Go=C5=82e=CC=A8biowski-Owczarek?=
Date: Wed, 7 Feb 2018 09:29:17 +0100
Subject: [PATCH 036/222] Build: Update Node from 0.12 to 8
---
.travis.yml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/.travis.yml b/.travis.yml
index 86929762..3396aa4c 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -1,5 +1,5 @@
language: node_js
node_js:
- - "0.12"
+ - "8"
before_script:
- npm install -g grunt-cli
From c5ad660a194ad5efda8ffb81f0a6e17b23971712 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Micha=C5=82=20Go=C5=82e=CC=A8biowski-Owczarek?=
Date: Wed, 7 Feb 2018 09:38:25 +0100
Subject: [PATCH 037/222] Build: Don't install grunt-cli manually in Travis
It's not needed as npm scripts have node_modules/.bin prepended to PATH.
It's also better to have all versions as locked up as possible to prevent build
instability.
---
.travis.yml | 2 --
1 file changed, 2 deletions(-)
diff --git a/.travis.yml b/.travis.yml
index 3396aa4c..efb09833 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -1,5 +1,3 @@
language: node_js
node_js:
- "8"
-before_script:
- - npm install -g grunt-cli
From 077f1bec6a1a9ff73cd364bdb1f75d5c09650a72 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Micha=C5=82=20Go=C5=82e=CC=A8biowski-Owczarek?=
Date: Wed, 7 Feb 2018 09:40:00 +0100
Subject: [PATCH 038/222] Build: Install the libxml2-utils package on Travis,
it's needed for xmllint
Closes #1080
---
.travis.yml | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/.travis.yml b/.travis.yml
index efb09833..8b645e42 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -1,3 +1,7 @@
language: node_js
node_js:
- "8"
+addons:
+ apt:
+ packages:
+ - libxml2-utils
From ba6e6a47dff7a83358d123ef4b57c416dc7f0b44 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Micha=C5=82=20Go=C5=82e=CC=A8biowski-Owczarek?=
Date: Thu, 8 Feb 2018 22:17:55 +0100
Subject: [PATCH 039/222] 1.12.29
---
package-lock.json | 2 +-
package.json | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/package-lock.json b/package-lock.json
index d3c03011..3fb8caf1 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -1,6 +1,6 @@
{
"name": "api.jquery.com",
- "version": "1.12.27",
+ "version": "1.12.29",
"lockfileVersion": 1,
"requires": true,
"dependencies": {
diff --git a/package.json b/package.json
index d388b15a..fcf103c2 100644
--- a/package.json
+++ b/package.json
@@ -2,7 +2,7 @@
"name": "api.jquery.com",
"title": "jQuery API Docs",
"description": "API reference documentation for the jQuery JavaScript Library.",
- "version": "1.12.28",
+ "version": "1.12.29",
"homepage": "https://github.com/jquery/api.jquery.com",
"author": {
"name": "jQuery Foundation and other contributors"
From ca12161164e2c2bc996f405ec80c74360d90b72f Mon Sep 17 00:00:00 2001
From: Aurelio De Rosa
Date: Tue, 30 Jan 2018 02:22:56 +0000
Subject: [PATCH 040/222] Added note about the deprecation of jQuery.isFunction
in version 3.3
Closes gh-1077
Fixes gh-1074
---
categories.xml | 5 +++++
entries/jQuery.isFunction.xml | 4 +++-
2 files changed, 8 insertions(+), 1 deletion(-)
diff --git a/categories.xml b/categories.xml
index 2ccd959e..4af831f8 100644
--- a/categories.xml
+++ b/categories.xml
@@ -70,6 +70,11 @@
+
+
+
diff --git a/entries/jQuery.isFunction.xml b/entries/jQuery.isFunction.xml
index 349061ef..7aed5574 100644
--- a/entries/jQuery.isFunction.xml
+++ b/entries/jQuery.isFunction.xml
@@ -1,5 +1,5 @@
-
+
jQuery.isFunction()
1.2
@@ -9,6 +9,7 @@
Determines if its argument is callable as a function.
+ As of jQuery 3.3, jQuery.isFunction()
has been deprecated. In most cases, its use can be replaced by typeof x === "function"
.
Note: As of jQuery 1.3, functions provided by the browser like alert()
and DOM element methods like getAttribute()
are not guaranteed to be detected as functions in browsers such as Internet Explorer.
@@ -57,4 +58,5 @@ true
+
From 9d03b3717a9e8d4b8a832866f8f8a7049e2f1cbb Mon Sep 17 00:00:00 2001
From: Aurelio De Rosa
Date: Tue, 30 Jan 2018 02:49:12 +0000
Subject: [PATCH 041/222] Specified that jQuery.each accepts array-like objects
Closes gh-1078
Fixes gh-1032
Ref gh-473
---
entries/jQuery.each.xml | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/entries/jQuery.each.xml b/entries/jQuery.each.xml
index 67fe70cc..18836015 100644
--- a/entries/jQuery.each.xml
+++ b/entries/jQuery.each.xml
@@ -3,13 +3,13 @@
jQuery.each()
1.0
-
- The array to iterate over.
+
+ The array or array-like object to iterate over.
- The function that will be executed on every object.
+ The function that will be executed on every value.
@@ -20,13 +20,12 @@
- The function that will be executed on every object.
+ The function that will be executed on every value.
A generic iterator function, which can be used to seamlessly iterate over both objects and arrays. Arrays and array-like objects with a length property (such as a function's arguments object) are iterated by numeric index, from 0 to length-1. Other objects are iterated via their named properties.
The $.each()
function is not the same as $(selector).each(), which is used to iterate, exclusively, over a jQuery object. The $.each()
function can be used to iterate over any collection, whether it is an object or an array. In the case of an array, the callback is passed an array index and a corresponding array value each time. (The value can also be accessed through the this
keyword, but Javascript will always wrap the this
value as an Object
even if it is a simple string or number value.) The method returns its first argument, the object that was iterated.
- Note: The $.each()
function internally retrieves and uses the length
property of the passed collection. So, if the collection has a property called length
— e.g. {bar: 'foo', length: 10}
— the function might not work as expected.
$.each([ 52, 97 ], function( index, value ) {
alert( index + ": " + value );
From 530dbceef1e332803a442486b1905915c324c98c Mon Sep 17 00:00:00 2001
From: pinguin999
Date: Tue, 19 Dec 2017 14:20:03 +0100
Subject: [PATCH 042/222] getJSON: Fix Example by using https
Closes gh-1072
Error was:
Mixed Content: The page at 'https://api.jquery.com/jquery.getjson/' was loaded over HTTPS, but requested an insecure script 'http://api.flickr.com/services/feeds/photos_public.gne?jsoncallback=jQuery110203890736409927371_1513688901634&tags=mount+rainier&tagmode=any&format=json&_=1513688901635'. This request has been blocked; the content must be served over HTTPS.
---
entries/jQuery.getJSON.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/entries/jQuery.getJSON.xml b/entries/jQuery.getJSON.xml
index c3b1e1e2..b8a5ee49 100644
--- a/entries/jQuery.getJSON.xml
+++ b/entries/jQuery.getJSON.xml
@@ -95,7 +95,7 @@ jqxhr.complete(function() {
Loads the four most recent pictures of Mount Rainier from the Flickr JSONP API.
-
+
jQuery.isWindow()
1.4.3
@@ -22,4 +22,5 @@ Is 'window' a window?
+
From 05caac8968b98aa45d066a382d45d4ce0510bae5 Mon Sep 17 00:00:00 2001
From: Daniil Zhilin
Date: Mon, 26 Mar 2018 19:43:40 +0300
Subject: [PATCH 044/222] jQuery.ajax: Change DataType to dataType
Closes #1088
---
entries/jQuery.ajax.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/entries/jQuery.ajax.xml b/entries/jQuery.ajax.xml
index 393bc83c..fa77edcd 100644
--- a/entries/jQuery.ajax.xml
+++ b/entries/jQuery.ajax.xml
@@ -15,7 +15,7 @@
1.0
A set of key/value pairs that configure the Ajax request. All settings are optional. A default can be set for any option with $.ajaxSetup().
-
+
A set of key/value pairs that map a given dataType
to its MIME type, which gets sent in the Accept
request header. This header tells the server what kind of response it will accept in return. For example, the following defines a custom type mycustomtype
to be sent with the request:
$.ajax({
From 82380a70f10728b4274afe387b742b24f97a9dfa Mon Sep 17 00:00:00 2001
From: Brahim Arkni
Date: Mon, 26 Mar 2018 17:44:56 +0100
Subject: [PATCH 045/222] data: Replace URL markdown syntax with HTML
Ref #943
Closes #1087
---
entries/data.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/entries/data.xml b/entries/data.xml
index 3606395d..66ed7253 100644
--- a/entries/data.xml
+++ b/entries/data.xml
@@ -89,7 +89,7 @@ alert( $( "body" ).data( "foo" ) ); // undefined
$( "body" ).data( "bar", "foobar" );
alert( $( "body" ).data( "bar" ) ); // foobar
- jQuery 3 changes the behavior of this method to align it to the Dataset API specifications. Specifically, jQuery 3 transforms every two-character sequence of "-" (U+002D) followed by a lowercase ASCII letter by the uppercase version of the letter as per definition of [the algorithm of the Dataset API](http://www.w3.org/TR/html5/dom.html#dom-dataset). Writing a statement like $( "body" ).data( { "my-name": "aValue" } ).data();
will return { myName: "aValue" }
.
+ jQuery 3 changes the behavior of this method to align it to the Dataset API specifications. Specifically, jQuery 3 transforms every two-character sequence of "-" (U+002D) followed by a lowercase ASCII letter by the uppercase version of the letter as per definition of the algorithm of the Dataset API. Writing a statement like $( "body" ).data( { "my-name": "aValue" } ).data();
will return { myName: "aValue" }
.
From 0998d12d4e12ec6b89028aeb89661187421384a4 Mon Sep 17 00:00:00 2001
From: Ethan Smith
Date: Mon, 26 Mar 2018 12:48:56 -0400
Subject: [PATCH 046/222] jQuery.ajax: Adjust note about cross-domain ajax
request with 'JSON' datatype
Fixes #959
Closes #1021
---
entries/jQuery.ajax.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/entries/jQuery.ajax.xml b/entries/jQuery.ajax.xml
index fa77edcd..8d92e0f8 100644
--- a/entries/jQuery.ajax.xml
+++ b/entries/jQuery.ajax.xml
@@ -98,7 +98,7 @@ $.ajax({
"xml"
: Returns a XML document that can be processed via jQuery.
"html"
: Returns HTML as plain text; included script tags are evaluated when inserted in the DOM.
"script"
: Evaluates the response as JavaScript and returns it as plain text. Disables caching by appending a query string parameter, _=[TIMESTAMP]
, to the URL unless the cache
option is set to true
. Note: This will turn POSTs into GETs for remote-domain requests.
- "json"
: Evaluates the response as JSON and returns a JavaScript object. Cross-domain "json"
requests are converted to "jsonp"
unless the request includes jsonp: false
in its request options. The JSON data is parsed in a strict manner; any malformed JSON is rejected and a parse error is thrown. As of jQuery 1.9, an empty response is also rejected; the server should return a response of null
or {}
instead. (See json.org for more information on proper JSON formatting.)
+ "json"
: Evaluates the response as JSON and returns a JavaScript object. Cross-domain "json"
requests that have a callback placeholder, e.g. ?callback=?
, are performed using JSONP unless the request includes jsonp: false
in its request options. The JSON data is parsed in a strict manner; any malformed JSON is rejected and a parse error is thrown. As of jQuery 1.9, an empty response is also rejected; the server should return a response of null
or {}
instead. (See json.org for more information on proper JSON formatting.)
"jsonp"
: Loads in a JSON block using JSONP. Adds an extra "?callback=?"
to the end of your URL to specify the callback. Disables caching by appending a query string parameter, "_=[TIMESTAMP]"
, to the URL unless the cache
option is set to true
.
"text"
: A plain text string.
multiple, space-separated values: As of jQuery 1.5, jQuery can convert a dataType from what it received in the Content-Type header to what you require. For example, if you want a text response to be treated as XML, use "text xml"
for the dataType. You can also make a JSONP request, have it received as text, and interpreted by jQuery as XML: "jsonp text xml"
. Similarly, a shorthand string such as "jsonp xml"
will first attempt to convert from jsonp to xml, and, failing that, convert from jsonp to text, and then from text to xml.
From 8e67f74e434adf26ab72903caae040fd85baf749 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Micha=C5=82=20Go=C5=82e=CC=A8biowski-Owczarek?=
Date: Mon, 26 Mar 2018 19:10:30 +0200
Subject: [PATCH 047/222] Misc: Change HTTP links to HTTPS where possible
Closes #1089
---
CONTRIBUTING.md | 6 +++---
LICENSE.txt | 4 ++--
README.md | 6 +++---
categories.xml | 6 +++---
entries/animate.xml | 6 +++---
entries/attr.xml | 2 +-
entries/contents.xml | 2 +-
entries/data.xml | 8 ++++----
entries/empty-selector.xml | 2 +-
entries/event.isImmediatePropagationStopped.xml | 2 +-
entries/event.isPropagationStopped.xml | 2 +-
entries/event.metaKey.xml | 4 ++--
entries/event.preventDefault.xml | 2 +-
entries/fadeIn.xml | 2 +-
entries/fadeOut.xml | 2 +-
entries/fadeToggle.xml | 2 +-
entries/hidden-selector.xml | 2 +-
entries/hide.xml | 2 +-
entries/html.xml | 2 +-
entries/id-selector.xml | 2 +-
entries/jQuery.ajax.xml | 10 +++++-----
entries/jQuery.ajaxPrefilter.xml | 4 ++--
entries/jQuery.boxModel.xml | 2 +-
entries/jQuery.browser.xml | 2 +-
entries/jQuery.extend.xml | 2 +-
entries/jQuery.fx.interval.xml | 2 +-
entries/jQuery.getJSON.xml | 2 +-
entries/jQuery.parseJSON.xml | 2 +-
entries/jQuery.support.xml | 2 +-
entries/jQuery.xml | 4 ++--
entries/keypress.xml | 2 +-
entries/lang-selector.xml | 2 +-
entries/map.xml | 2 +-
entries/nth-child-selector.xml | 2 +-
entries/nth-last-child-selector.xml | 2 +-
entries/nth-last-of-type-selector.xml | 2 +-
entries/nth-of-type-selector.xml | 2 +-
entries/on.xml | 4 ++--
entries/parent-selector.xml | 2 +-
entries/prop.xml | 2 +-
entries/ready.xml | 2 +-
entries/serialize.xml | 2 +-
entries/serializeArray.xml | 2 +-
entries/show.xml | 2 +-
entries/slideDown.xml | 2 +-
entries/slideToggle.xml | 2 +-
entries/slideUp.xml | 2 +-
entries/target-selector.xml | 4 ++--
entries/toggle.xml | 2 +-
entries/visible-selector.xml | 2 +-
notes.xsl | 4 ++--
pages/Types.html | 11 +++--------
52 files changed, 76 insertions(+), 81 deletions(-)
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index ba9f6b8f..9a004cd3 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -1,5 +1,5 @@
-Welcome! Thanks for your interest in contributing to api.jquery.com. You're **almost** in the right place. More information on how to contribute to this and all other jQuery Foundation projects is over at [contribute.jquery.org](http://contribute.jquery.org). You'll definitely want to take a look at the articles on contributing [documentation](http://contribute.jquery.org/documentation).
+Welcome! Thanks for your interest in contributing to api.jquery.com. You're **almost** in the right place. More information on how to contribute to this and all other jQuery Foundation projects is over at [contribute.jquery.org](https://contribute.jquery.org). You'll definitely want to take a look at the articles on contributing [documentation](https://contribute.jquery.org/documentation).
-You may also want to take a look at our [commit & pull request guide](http://contribute.jquery.org/commits-and-pull-requests/) and [style guides](http://contribute.jquery.org/style-guide/) for instructions on how to maintain your fork and submit your code. Before we can merge any pull request, we'll also need you to sign our [contributor license agreement](http://contribute.jquery.org/cla).
+You may also want to take a look at our [commit & pull request guide](https://contribute.jquery.org/commits-and-pull-requests/) and [style guides](https://contribute.jquery.org/style-guide/) for instructions on how to maintain your fork and submit your code. Before we can merge any pull request, we'll also need you to sign our [contributor license agreement](https://contribute.jquery.org/cla).
-You can find us on [IRC](http://irc.jquery.org), specifically in #jquery-dev and #jquery-content should you have any questions. If you've never contributed to open source before, we've put together [a short guide with tips, tricks, and ideas on getting started](http://contribute.jquery.org/open-source/).
+You can find us on [IRC](https://irc.jquery.org), specifically in #jquery-dev and #jquery-content should you have any questions. If you've never contributed to open source before, we've put together [a short guide with tips, tricks, and ideas on getting started](https://contribute.jquery.org/open-source/).
diff --git a/LICENSE.txt b/LICENSE.txt
index 19a9bad2..203b68a7 100644
--- a/LICENSE.txt
+++ b/LICENSE.txt
@@ -1,4 +1,4 @@
-Copyright Packt Publishing (http://packtpub.com/),
+Copyright Packt Publishing (https://www.packtpub.com/),
jQuery Foundation (https://jquery.org/), and other contributors.
This software consists of voluntary contributions made by many
@@ -35,7 +35,7 @@ Copyright and related rights for sample code are waived via CC0. Sample
code is defined as all source code displayed within the prose of the
documentation and all examples and demos.
-CC0: http://creativecommons.org/publicdomain/zero/1.0/
+CC0: https://creativecommons.org/publicdomain/zero/1.0/
====
diff --git a/README.md b/README.md
index 805e0442..1141cd22 100644
--- a/README.md
+++ b/README.md
@@ -2,14 +2,14 @@
## Building and Deploying
-To build and deploy your changes for previewing in a [`jquery-wp-content`](https://github.com/jquery/jquery-wp-content) instance, follow the [workflow instructions](http://contribute.jquery.org/web-sites/#workflow) from our documentation on [contributing to jQuery Foundation web sites](http://contribute.jquery.org/web-sites/).
+To build and deploy your changes for previewing in a [`jquery-wp-content`](https://github.com/jquery/jquery-wp-content) instance, follow the [workflow instructions](https://contribute.jquery.org/web-sites/#workflow) from our documentation on [contributing to jQuery Foundation web sites](http://contribute.jquery.org/web-sites/).
### Requirements
* [libxml2](http://xmlsoft.org/)
* [libxslt](http://xmlsoft.org/libxslt/)
-The `xmllint` and `xsltproc` utilities need to be in your path. If you are on Windows, you can get libxml2 and libxslt from zlatkovic.com.
+The `xmllint` and `xsltproc` utilities need to be in your path. If you are on Windows, you can get libxml2 and libxslt from zlatkovic.com.
**Note**: If you're using Windows and you receive the error "Error" when executing the task `build-xml-entries:all`, try to add the DLL `libwinpthread-1.dll` in the root of the project.
@@ -49,7 +49,7 @@ The `xmllint` and `xsltproc` utilities need to be in your path. If you are on Wi
### Code Style
-Code in the API documentation should follow the [jQuery Core Style Guide](http://contribute.jquery.org/style-guide/) with the following addition:
+Code in the API documentation should follow the [jQuery Core Style Guide](https://contribute.jquery.org/style-guide/) with the following addition:
* **Document ready syntax**: Use `$( document ).ready(function() {` instead of `$(function() {` as it's harder for new users to distinguish the difference between the latter and an IIFE.
diff --git a/categories.xml b/categories.xml
index 4af831f8..b08956d9 100644
--- a/categories.xml
+++ b/categories.xml
@@ -68,12 +68,12 @@
@@ -428,7 +428,7 @@ var files = event.originalEvent.dataTransfer.files;
diff --git a/entries/animate.xml b/entries/animate.xml
index 5db2dcf6..97cac616 100644
--- a/entries/animate.xml
+++ b/entries/animate.xml
@@ -72,10 +72,10 @@ $( "#clickme" ).click(function() {
The opacity
of the image is already at its target value, so this property is not animated by the second click. Since the target value for left
is a relative value, the image moves even farther to the right during this second animation.
Directional properties (top
, right
, bottom
, left
) have no discernible effect on elements if their position
style property is static
, which it is by default.
-
Note: The jQuery UI project extends the .animate()
method by allowing some non-numeric styles such as colors to be animated. The project also includes mechanisms for specifying animations through CSS classes rather than individual attributes.
+
Note: The jQuery UI project extends the .animate()
method by allowing some non-numeric styles such as colors to be animated. The project also includes mechanisms for specifying animations through CSS classes rather than individual attributes.
-
Note: if attempting to animate an element with a height or width of 0px, where contents of the element are visible due to overflow, jQuery may clip this overflow during animation. By fixing the dimensions of the original element being hidden however, it is possible to ensure that the animation runs smoothly. A clearfix can be used to automatically fix the dimensions of your main element without the need to set this manually.
+
Note: if attempting to animate an element with a height or width of 0px, where contents of the element are visible due to overflow, jQuery may clip this overflow during animation. By fixing the dimensions of the original element being hidden however, it is possible to ensure that the animation runs smoothly. A clearfix can be used to automatically fix the dimensions of your main element without the need to set this manually.
Step Function
The second version of .animate()
provides a step
option — a callback function that is fired at each step of the animation. This function is useful for enabling custom animation types or altering the animation as it is occurring. It accepts two arguments (now
and fx
), and this
is set to the DOM element being animated.
@@ -96,7 +96,7 @@ $( "li" ).animate({
});
Easing
- The remaining parameter of .animate()
is a string naming an easing function to use. An easing function specifies the speed at which the animation progresses at different points within the animation. The only easing implementations in the jQuery library are the default, called swing
, and one that progresses at a constant pace, called linear
. More easing functions are available with the use of plug-ins, most notably the jQuery UI suite.
+ The remaining parameter of .animate()
is a string naming an easing function to use. An easing function specifies the speed at which the animation progresses at different points within the animation. The only easing implementations in the jQuery library are the default, called swing
, and one that progresses at a constant pace, called linear
. More easing functions are available with the use of plug-ins, most notably the jQuery UI suite.
Per-property Easing
As of jQuery version 1.4, you can set per-property easing functions within a single .animate()
call. In the first version of .animate()
, each property can take an array as its value: The first member of the array is the CSS property and the second member is an easing function. If a per-property easing function is not defined for a particular property, it uses the value of the .animate()
method's optional easing argument. If the easing argument is not defined, the default swing
function is used.
For example, to simultaneously animate the width and height with the swing
easing function and the opacity with the linear
easing function:
diff --git a/entries/attr.xml b/entries/attr.xml
index 2a963254..1628ec72 100644
--- a/entries/attr.xml
+++ b/entries/attr.xml
@@ -69,7 +69,7 @@
- According to the W3C forms specification, the checked
attribute is a boolean attribute, which means the corresponding property is true if the attribute is present at all—even if, for example, the attribute has no value or is set to empty string value or even "false". This is true of all boolean attributes.
+ According to the W3C forms specification, the checked
attribute is a boolean attribute, which means the corresponding property is true if the attribute is present at all—even if, for example, the attribute has no value or is set to empty string value or even "false". This is true of all boolean attributes.
Nevertheless, the most important concept to remember about the checked
attribute is that it does not correspond to the checked
property. The attribute actually corresponds to the defaultChecked
property and should be used only to set the initial value of the checkbox. The checked
attribute value does not change with the state of the checkbox, while the checked
property does. Therefore, the cross-browser-compatible way to determine if a checkbox is checked is to use the property:
-
diff --git a/entries/contents.xml b/entries/contents.xml
index 5bfe9fc6..70188f7b 100644
--- a/entries/contents.xml
+++ b/entries/contents.xml
@@ -46,7 +46,7 @@ $( "p" )
.wrap( "" );
]]>
diff --git a/entries/data.xml b/entries/data.xml
index 66ed7253..71c6c10f 100644
--- a/entries/data.xml
+++ b/entries/data.xml
@@ -31,7 +31,7 @@ $( "body" ).data(); // { foo: 52, bar: { myType: "test", count: 40 }, baz: [ 1,
In jQuery 1.4.3 setting an element's data object with .data(obj)
extends the data previously stored with that element.
Prior to jQuery 1.4.3 (starting in jQuery 1.4) the .data()
method completely replaced all data, instead of just extending the data object. If you are using third-party plugins it may not be advisable to completely replace the element's data object, since plugins may have also set data.
- jQuery 3 changes the behavior of this method to align it to the Dataset API specifications. Specifically, jQuery 3 transforms every two-character sequence of "-" (U+002D) followed by a lowercase ASCII letter by the uppercase version of the letter as per definition of the algorithm of the Dataset API. Writing a statement like $( "body" ).data( { "my-name": "aValue" } ).data();
will return { myName: "aValue" }
.
+ jQuery 3 changes the behavior of this method to align it to the Dataset API specifications. Specifically, jQuery 3 transforms every two-character sequence of "-" (U+002D) followed by a lowercase ASCII letter by the uppercase version of the letter as per definition of the algorithm of the Dataset API. Writing a statement like $( "body" ).data( { "my-name": "aValue" } ).data();
will return { myName: "aValue" }
.
Due to the way browsers interact with plugins and external code, the .data()
method cannot be used on <object>
(unless it's a Flash plugin), <applet>
or <embed>
elements.
@@ -89,11 +89,11 @@ alert( $( "body" ).data( "foo" ) ); // undefined
$( "body" ).data( "bar", "foobar" );
alert( $( "body" ).data( "bar" ) ); // foobar
- jQuery 3 changes the behavior of this method to align it to the Dataset API specifications. Specifically, jQuery 3 transforms every two-character sequence of "-" (U+002D) followed by a lowercase ASCII letter by the uppercase version of the letter as per definition of the algorithm of the Dataset API. Writing a statement like $( "body" ).data( { "my-name": "aValue" } ).data();
will return { myName: "aValue" }
.
+ jQuery 3 changes the behavior of this method to align it to the Dataset API specifications. Specifically, jQuery 3 transforms every two-character sequence of "-" (U+002D) followed by a lowercase ASCII letter by the uppercase version of the letter as per definition of the algorithm of the Dataset API. Writing a statement like $( "body" ).data( { "my-name": "aValue" } ).data();
will return { myName: "aValue" }
.
- As of jQuery 1.4.3 HTML 5 data- attributes will be automatically pulled in to jQuery's data object. The treatment of attributes with embedded dashes was changed in jQuery 1.6 to conform to the W3C HTML5 specification.
+ As of jQuery 1.4.3 HTML 5 data- attributes will be automatically pulled in to jQuery's data object. The treatment of attributes with embedded dashes was changed in jQuery 1.6 to conform to the W3C HTML5 specification.
For example, given the following HTML:
<div data-role="page" data-last-value="43" data-hidden="true" data-options='{"name":"John"}'></div>
All of the following jQuery code will work.
@@ -105,7 +105,7 @@ $( "div" ).data( "options" ).name === "John";
The second statement of the code above correctly refers to the data-last-value
attribute of the element. In case no data is stored with the passed key, jQuery searches among the attributes of the element, converting a camel-cased string into a dashed string and then prepending data-
to the result. So, the string lastValue
is converted to data-last-value
.
Every attempt is made to convert the string to a JavaScript value (this includes booleans, numbers, objects, arrays, and null). A value is only converted to a number if doing so doesn't change the value's representation. For example, "1E02" and "100.000" are equivalent as numbers (numeric value 100) but converting them would alter their representation so they are left as strings. The string value "100" is converted to the number 100.
- When the data attribute is an object (starts with '{') or array (starts with '[') then jQuery.parseJSON
is used to parse the string; it must follow valid JSON syntax including quoted property names. If the value isn't parseable as a JavaScript value, it is left as a string.
+ When the data attribute is an object (starts with '{') or array (starts with '[') then jQuery.parseJSON
is used to parse the string; it must follow valid JSON syntax including quoted property names. If the value isn't parseable as a JavaScript value, it is left as a string.
To retrieve the value's attribute as a string without any attempt to convert it, use the attr()
method.
The data- attributes are pulled in the first time the data property is accessed and then are no longer accessed or mutated (all data values are then stored internally in jQuery).
Calling .data()
with no parameters retrieves all of the values as a JavaScript object. This object can be safely cached in a variable as long as a new object is not set with .data(obj)
. Using the object directly to get or set values is faster than making individual calls to .data()
to get or set each value:
diff --git a/entries/empty-selector.xml b/entries/empty-selector.xml
index 8e06d87c..165e2112 100644
--- a/entries/empty-selector.xml
+++ b/entries/empty-selector.xml
@@ -9,7 +9,7 @@
This is the inverse of :parent
.
One important thing to note with :empty (and :parent) is that child elements include text nodes.
- The W3C recommends that the <p>
element have at least one child node, even if that child is merely text (see http://www.w3.org/TR/html401/struct/text.html#edef-P). Some other elements, on the other hand, are empty (i.e. have no children) by definition: <input>, <img>, <br>, and <hr>, for example.
+ The W3C recommends that the <p>
element have at least one child node, even if that child is merely text (see https://www.w3.org/TR/html401/struct/text.html#edef-P). Some other elements, on the other hand, are empty (i.e. have no children) by definition: <input>, <img>, <br>, and <hr>, for example.
Finds all elements that are empty - they don't have child elements or text.
diff --git a/entries/event.isImmediatePropagationStopped.xml b/entries/event.isImmediatePropagationStopped.xml
index 44235564..4d8f3ad1 100644
--- a/entries/event.isImmediatePropagationStopped.xml
+++ b/entries/event.isImmediatePropagationStopped.xml
@@ -6,7 +6,7 @@
Returns whether event.stopImmediatePropagation() was ever called on this event object.
- This property was introduced in DOM level 3.
+ This property was introduced in DOM level 3.
Checks whether event.stopImmediatePropagation() was called.
diff --git a/entries/event.isPropagationStopped.xml b/entries/event.isPropagationStopped.xml
index ff7f7451..26a85b76 100644
--- a/entries/event.isPropagationStopped.xml
+++ b/entries/event.isPropagationStopped.xml
@@ -6,7 +6,7 @@
Returns whether event.stopPropagation() was ever called on this event object.
- This event method is described in the W3C DOM Level 3 specification.
+ This event method is described in the W3C DOM Level 3 specification.
Checks whether event.stopPropagation() was called
diff --git a/entries/event.metaKey.xml b/entries/event.metaKey.xml
index b83eeadd..f27b6e46 100644
--- a/entries/event.metaKey.xml
+++ b/entries/event.metaKey.xml
@@ -8,8 +8,8 @@
Returns a boolean value (true
or false
) that indicates whether or not the META key was pressed at the time the event fired.
This key might map to an alternative key name on some platforms.
- On Macintosh keyboards, the META key maps to the Command key (⌘).
- On Windows keyboards, the META key maps to the Windows key.
+ On Macintosh keyboards, the META key maps to the Command key (⌘).
+ On Windows keyboards, the META key maps to the Windows key.
Determine whether the META key was pressed when the event fired.
diff --git a/entries/event.preventDefault.xml b/entries/event.preventDefault.xml
index 68f0a43a..ac534fcb 100644
--- a/entries/event.preventDefault.xml
+++ b/entries/event.preventDefault.xml
@@ -19,7 +19,7 @@ $( "a" ).click(function( event ) {
});
]]>
diff --git a/entries/fadeIn.xml b/entries/fadeIn.xml
index f3b2e9e2..0f4b6888 100644
--- a/entries/fadeIn.xml
+++ b/entries/fadeIn.xml
@@ -43,7 +43,7 @@ $( "#clickme" ).click(function() {
Figure 1 - Illustration of the fadeIn()
effect
Easing
- As of jQuery 1.4.3, an optional string naming an easing function may be used. Easing functions specify the speed at which the animation progresses at different points within the animation. The only easing implementations in the jQuery library are the default, called swing
, and one that progresses at a constant pace, called linear
. More easing functions are available with the use of plug-ins, most notably the jQuery UI suite.
+ As of jQuery 1.4.3, an optional string naming an easing function may be used. Easing functions specify the speed at which the animation progresses at different points within the animation. The only easing implementations in the jQuery library are the default, called swing
, and one that progresses at a constant pace, called linear
. More easing functions are available with the use of plug-ins, most notably the jQuery UI suite.
Callback Function
If supplied, the callback is fired once the animation is complete. This can be useful for stringing different animations together in sequence. The callback is not sent any arguments, but this
is set to the DOM element being animated. If multiple elements are animated, it is important to note that the callback is executed once per matched element, not once for the animation as a whole.
As of jQuery 1.6, the .promise()
method can be used in conjunction with the deferred.done()
method to execute a single callback for the animation as a whole when all matching elements have completed their animations ( See the example for .promise() ).
diff --git a/entries/fadeOut.xml b/entries/fadeOut.xml
index 1bdddaf6..186056eb 100644
--- a/entries/fadeOut.xml
+++ b/entries/fadeOut.xml
@@ -47,7 +47,7 @@ $( "#clickme" ).click(function() {
Note: To avoid unnecessary DOM manipulation, .fadeOut()
will not hide an element that is already considered hidden. For information on which elements jQuery considers hidden, see :hidden Selector.
Easing
- As of jQuery 1.4.3, an optional string naming an easing function may be used. Easing functions specify the speed at which the animation progresses at different points within the animation. The only easing implementations in the jQuery library are the default, called swing
, and one that progresses at a constant pace, called linear
. More easing functions are available with the use of plug-ins, most notably the jQuery UI suite.
+ As of jQuery 1.4.3, an optional string naming an easing function may be used. Easing functions specify the speed at which the animation progresses at different points within the animation. The only easing implementations in the jQuery library are the default, called swing
, and one that progresses at a constant pace, called linear
. More easing functions are available with the use of plug-ins, most notably the jQuery UI suite.
Callback Function
If supplied, the callback is fired once the animation is complete. This can be useful for stringing different animations together in sequence. The callback is not sent any arguments, but this
is set to the DOM element being animated. If multiple elements are animated, it is important to note that the callback is executed once per matched element, not once for the animation as a whole.
As of jQuery 1.6, the .promise()
method can be used in conjunction with the deferred.done()
method to execute a single callback for the animation as a whole when all matching elements have completed their animations ( See the example for .promise() ).
diff --git a/entries/fadeToggle.xml b/entries/fadeToggle.xml
index 93bac084..f3906b45 100644
--- a/entries/fadeToggle.xml
+++ b/entries/fadeToggle.xml
@@ -17,7 +17,7 @@
The .fadeToggle()
method animates the opacity of the matched elements. When called on a visible element, the element's display
style property is set to none
once the opacity reaches 0, so the element no longer affects the layout of the page.
Durations are given in milliseconds; higher values indicate slower animations, not faster ones. The strings 'fast'
and 'slow'
can be supplied to indicate durations of 200
and 600
milliseconds, respectively.
Easing
- The string representing an easing function specifies the speed at which the animation progresses at different points within the animation. The only easing implementations in the jQuery library are the default, called swing
, and one that progresses at a constant pace, called linear
. More easing functions are available with the use of plug-ins, most notably the jQuery UI suite.
+ The string representing an easing function specifies the speed at which the animation progresses at different points within the animation. The only easing implementations in the jQuery library are the default, called swing
, and one that progresses at a constant pace, called linear
. More easing functions are available with the use of plug-ins, most notably the jQuery UI suite.
Callback Function
If supplied, the callback is fired once the animation is complete. This can be useful for stringing different animations together in sequence. The callback is not sent any arguments, but this
is set to the DOM element being animated. If multiple elements are animated, it is important to note that the callback is executed once per matched element, not once for the animation as a whole.
As of jQuery 1.6, the .promise()
method can be used in conjunction with the deferred.done()
method to execute a single callback for the animation as a whole when all matching elements have completed their animations ( See the example for .promise() ).
diff --git a/entries/hidden-selector.xml b/entries/hidden-selector.xml
index 47c0bf6c..e44d732b 100644
--- a/entries/hidden-selector.xml
+++ b/entries/hidden-selector.xml
@@ -18,7 +18,7 @@
Elements that are not in a document are not considered to be visible; jQuery does not have a way to know if they will be visible when appended to a document since it depends on the applicable styles.
This selector is the opposite of the :visible
selector. So, every element selected by :hidden
isn't selected by :visible
and vice versa.
During animations to show an element, the element is considered to be visible at the start of the animation.
- How :hidden
is determined was changed in jQuery 1.3.2. An element is assumed to be hidden if it or any of its parents consumes no space in the document. CSS visibility isn't taken into account (therefore $( elem ).css( "visibility", "hidden" ).is( ":hidden" ) == false
). The release notes outline the changes in more detail.
+ How :hidden
is determined was changed in jQuery 1.3.2. An element is assumed to be hidden if it or any of its parents consumes no space in the document. CSS visibility isn't taken into account (therefore $( elem ).css( "visibility", "hidden" ).is( ":hidden" ) == false
). The release notes outline the changes in more detail.
jQuery 3 slightly modifies the meaning of :hidden
(and therefore of :visible
). Starting with this version, elements will be considered :hidden
if they don't have any layout boxes. For example, br
elements and inline elements with no content will not be selected by the :hidden
selector.
diff --git a/entries/hide.xml b/entries/hide.xml
index 3a68ca15..b90aed05 100644
--- a/entries/hide.xml
+++ b/entries/hide.xml
@@ -35,7 +35,7 @@ $( ".target" ).hide();
When a duration, a plain object, or a "complete" function is provided, .hide()
becomes an animation method. The .hide()
method animates the width, height, and opacity of the matched elements simultaneously. When these properties reach 0, the display
style property is set to none
to ensure that the element no longer affects the layout of the page.
Durations are given in milliseconds; higher values indicate slower animations, not faster ones. The strings 'fast'
and 'slow'
can be supplied to indicate durations of 200
and 600
milliseconds, respectively.
Note that .hide()
is fired immediately and will override the animation queue if no duration or a duration of 0 is specified.
- As of jQuery 1.4.3, an optional string naming an easing function may be used. Easing functions specify the speed at which the animation progresses at different points within the animation. The only easing implementations in the jQuery library are the default, called swing
, and one that progresses at a constant pace, called linear
. More easing functions are available with the use of plug-ins, most notably the jQuery UI suite.
+ As of jQuery 1.4.3, an optional string naming an easing function may be used. Easing functions specify the speed at which the animation progresses at different points within the animation. The only easing implementations in the jQuery library are the default, called swing
, and one that progresses at a constant pace, called linear
. More easing functions are available with the use of plug-ins, most notably the jQuery UI suite.
If supplied, the callback is fired once the animation is complete. This can be useful for stringing different animations together in sequence. The callback is not sent any arguments, but this
is set to the DOM element being animated. If multiple elements are animated, it is important to note that the callback is executed once per matched element, not once for the animation as a whole.
Note: This method may cause performance issues, especially when used on many elements. If you're encountering such issues, use performance testing tools to determine whether this method is causing them. Moreover, this method can cause problems with responsive layouts if the display value differs at different viewport sizes.
diff --git a/entries/html.xml b/entries/html.xml
index 7a4f2594..b830c566 100644
--- a/entries/html.xml
+++ b/entries/html.xml
@@ -118,7 +118,7 @@ $( "div.demo-container" ).html(function() {
});
Given a document with six paragraphs, this example will set the HTML of <div class="demo-container">
to <p>All new content for <em>6 paragraphs!</em></p>
.
-
This method uses the browser's innerHTML
property. Some browsers may not generate a DOM that exactly replicates the HTML source provided. For example, Internet Explorer prior to version 8 will convert all href
properties on links to absolute URLs, and Internet Explorer prior to version 9 will not correctly handle HTML5 elements without the addition of a separate compatibility layer.
+
This method uses the browser's innerHTML
property. Some browsers may not generate a DOM that exactly replicates the HTML source provided. For example, Internet Explorer prior to version 8 will convert all href
properties on links to absolute URLs, and Internet Explorer prior to version 9 will not correctly handle HTML5 elements without the addition of a separate compatibility layer.
To set the content of a <script>
element, which does not contain HTML, use the .text()
method and not .html()
.
Note: In Internet Explorer up to and including version 9, setting the text content of an HTML element may corrupt the text nodes of its children that are being removed from the document as a result of the operation. If you are keeping references to these DOM elements and need them to be unchanged, use .empty().html( string )
instead of .html(string)
so that the elements are removed from the document before the new string is assigned to the element.
diff --git a/entries/id-selector.xml b/entries/id-selector.xml
index 20aab992..3cc8b926 100644
--- a/entries/id-selector.xml
+++ b/entries/id-selector.xml
@@ -13,7 +13,7 @@
For id selectors, jQuery uses the JavaScript function document.getElementById()
, which is extremely efficient. When another selector is attached to the id selector, such as h2#pageTitle
, jQuery performs an additional check before identifying the element as a match.
Calling jQuery()
(or $()
) with an id selector as its argument will return a jQuery object containing a collection of either zero or one DOM element.
Each id
value must be used only once within a document. If more than one element has been assigned the same ID, queries that use that ID will only select the first matched element in the DOM. This behavior should not be relied on, however; a document with more than one element using the same ID is invalid.
-
If the id contains characters like periods or colons you have to escape those characters with backslashes.
+
If the id contains characters like periods or colons you have to escape those characters with backslashes.
Select the element with the id "myDiv" and give it a red border.
diff --git a/entries/jQuery.ajax.xml b/entries/jQuery.ajax.xml
index 8d92e0f8..80157d28 100644
--- a/entries/jQuery.ajax.xml
+++ b/entries/jQuery.ajax.xml
@@ -98,8 +98,8 @@ $.ajax({
"xml"
: Returns a XML document that can be processed via jQuery.
"html"
: Returns HTML as plain text; included script tags are evaluated when inserted in the DOM.
"script"
: Evaluates the response as JavaScript and returns it as plain text. Disables caching by appending a query string parameter, _=[TIMESTAMP]
, to the URL unless the cache
option is set to true
. Note: This will turn POSTs into GETs for remote-domain requests.
- "json"
: Evaluates the response as JSON and returns a JavaScript object. Cross-domain "json"
requests that have a callback placeholder, e.g. ?callback=?
, are performed using JSONP unless the request includes jsonp: false
in its request options. The JSON data is parsed in a strict manner; any malformed JSON is rejected and a parse error is thrown. As of jQuery 1.9, an empty response is also rejected; the server should return a response of null
or {}
instead. (See json.org for more information on proper JSON formatting.)
- "jsonp"
: Loads in a JSON block using JSONP. Adds an extra "?callback=?"
to the end of your URL to specify the callback. Disables caching by appending a query string parameter, "_=[TIMESTAMP]"
, to the URL unless the cache
option is set to true
.
+ "json"
: Evaluates the response as JSON and returns a JavaScript object. Cross-domain "json"
requests that have a callback placeholder, e.g. ?callback=?
, are performed using JSONP unless the request includes jsonp: false
in its request options. The JSON data is parsed in a strict manner; any malformed JSON is rejected and a parse error is thrown. As of jQuery 1.9, an empty response is also rejected; the server should return a response of null
or {}
instead. (See json.org for more information on proper JSON formatting.)
+ "jsonp"
: Loads in a JSON block using JSONP. Adds an extra "?callback=?"
to the end of your URL to specify the callback. Disables caching by appending a query string parameter, "_=[TIMESTAMP]"
, to the URL unless the cache
option is set to true
.
"text"
: A plain text string.
multiple, space-separated values: As of jQuery 1.5, jQuery can convert a dataType from what it received in the Content-Type header to what you require. For example, if you want a text response to be treated as XML, use "text xml"
for the dataType. You can also make a JSONP request, have it received as text, and interpreted by jQuery as XML: "jsonp text xml"
. Similarly, a shorthand string such as "jsonp xml"
will first attempt to convert from jsonp to xml, and, failing that, convert from jsonp to text, and then from text to xml.
@@ -217,7 +217,7 @@ $.ajax();
As of jQuery 1.5.1, the jqXHR
object also contains the overrideMimeType()
method (it was available in jQuery 1.4.x, as well, but was temporarily removed in jQuery 1.5). The .overrideMimeType()
method may be used in the beforeSend()
callback function, for example, to modify the response content-type header:
$.ajax({
- url: "http://fiddle.jshell.net/favicon.png",
+ url: "https://fiddle.jshell.net/favicon.png",
beforeSend: function( xhr ) {
xhr.overrideMimeType( "text/plain; charset=x-user-defined" );
}
@@ -326,11 +326,11 @@ jqxhr.always(function() {
Different types of response to $.ajax()
call are subjected to different kinds of pre-processing before being passed to the success handler. The type of pre-processing depends by default upon the Content-Type of the response, but can be set explicitly using the dataType
option. If the dataType
option is provided, the Content-Type header of the response will be disregarded.
The available data types are text
, html
, xml
, json
, jsonp
, and script
.
If text
or html
is specified, no pre-processing occurs. The data is simply passed on to the success handler, and made available through the responseText
property of the jqXHR
object.
- If xml
is specified, the response is parsed using jQuery.parseXML
before being passed, as an XMLDocument
, to the success handler. The XML document is made available through the responseXML
property of the jqXHR
object.
+ If xml
is specified, the response is parsed using jQuery.parseXML
before being passed, as an XMLDocument
, to the success handler. The XML document is made available through the responseXML
property of the jqXHR
object.
If json
is specified, the response is parsed using jQuery.parseJSON
before being passed, as an object, to the success handler. The parsed JSON object is made available through the responseJSON
property of the jqXHR
object.
If script
is specified, $.ajax()
will execute the JavaScript that is received from the server before passing it on to the success handler as a string.
If jsonp
is specified, $.ajax()
will automatically append a query string parameter of (by default) callback=?
to the URL. The jsonp
and jsonpCallback
properties of the settings passed to $.ajax()
can be used to specify, respectively, the name of the query string parameter and the name of the JSONP callback function. The server should return valid JavaScript that passes the JSON response into the callback function. $.ajax()
will execute the returned JavaScript, calling the JSONP callback function, before passing the JSON object contained in the response to the $.ajax()
success handler.
- For more information on JSONP, see the original post detailing its use.
+ For more information on JSONP, see the original post detailing its use.
Sending Data to the Server
By default, Ajax requests are sent using the GET HTTP method. If the POST method is required, the method can be specified by setting a value for the type
option. This option affects how the contents of the data
option are sent to the server. POST data will always be transmitted to the server using UTF-8 charset, per the W3C XMLHTTPRequest standard.
The data
option can contain either a query string of the form key1=value1&key2=value2
, or an object of the form {key1: 'value1', key2: 'value2'}
. If the latter form is used, the data is converted into a query string using jQuery.param()
before it is sent. This processing can be circumvented by setting processData
to false
. The processing might be undesirable if you wish to send an XML object to the server; in this case, change the contentType
option from application/x-www-form-urlencoded
to a more appropriate MIME type.
diff --git a/entries/jQuery.ajaxPrefilter.xml b/entries/jQuery.ajaxPrefilter.xml
index f82d8d02..708ca829 100644
--- a/entries/jQuery.ajaxPrefilter.xml
+++ b/entries/jQuery.ajaxPrefilter.xml
@@ -40,11 +40,11 @@ $.ajaxPrefilter(function( options, originalOptions, jqXHR ) {
}
});
- Prefilters can also be used to modify existing options. For example, the following proxies cross-domain requests through http://mydomain.net/proxy/:
+ Prefilters can also be used to modify existing options. For example, the following proxies cross-domain requests through https://mydomain.net/proxy/:
$.ajaxPrefilter(function( options ) {
if ( options.crossDomain ) {
- options.url = "http://mydomain.net/proxy/" + encodeURIComponent( options.url );
+ options.url = "https://mydomain.net/proxy/" + encodeURIComponent( options.url );
options.crossDomain = false;
}
});
diff --git a/entries/jQuery.boxModel.xml b/entries/jQuery.boxModel.xml
index f260538a..ac464850 100644
--- a/entries/jQuery.boxModel.xml
+++ b/entries/jQuery.boxModel.xml
@@ -4,7 +4,7 @@
1.0
- States if the current page, in the user's browser, is being rendered using the W3C CSS Box Model. This property was removed in jQuery 1.8. Please try to use feature detection instead.
+ States if the current page, in the user's browser, is being rendered using the W3C CSS Box Model. This property was removed in jQuery 1.8. Please try to use feature detection instead.
diff --git a/entries/jQuery.browser.xml b/entries/jQuery.browser.xml
index e7c690ac..667ed5f1 100644
--- a/entries/jQuery.browser.xml
+++ b/entries/jQuery.browser.xml
@@ -18,7 +18,7 @@
This property is available immediately. It is therefore safe to use it to determine whether or not to call $(document).ready()
.
The $.browser
property is deprecated in jQuery 1.3, and its functionality may be moved to a team-supported plugin in a future release of jQuery.
- Because $.browser
uses navigator.userAgent
to determine the platform, it is vulnerable to spoofing by the user or misrepresentation by the browser itself. It is always best to avoid browser-specific code entirely where possible. Instead of relying on $.browser
it's better to use libraries like Modernizr.
+ Because $.browser
uses navigator.userAgent
to determine the platform, it is vulnerable to spoofing by the user or misrepresentation by the browser itself. It is always best to avoid browser-specific code entirely where possible. Instead of relying on $.browser
it's better to use libraries like Modernizr.
Show the browser info.
diff --git a/entries/jQuery.extend.xml b/entries/jQuery.extend.xml
index 42edb4ae..b28ec2e0 100644
--- a/entries/jQuery.extend.xml
+++ b/entries/jQuery.extend.xml
@@ -38,7 +38,7 @@
Warning: Passing false
for the first argument is not supported.
Undefined properties are not copied. However, properties inherited from the object's prototype will be copied over. Properties that are an object constructed via new MyCustomObject(args)
, or built-in JavaScript types such as Date or RegExp, are not re-constructed and will appear as plain Objects in the resulting object or array.
On a deep
extend, Object and Array are extended, but object wrappers on primitive types such as String, Boolean, and Number are not. Deep-extending a cyclical data structure will result in an error.
- For needs that fall outside of this behavior, write a custom extend method instead, or use a library like lodash.
+ For needs that fall outside of this behavior, write a custom extend method instead, or use a library like lodash.
Merge two objects, modifying the first.
diff --git a/entries/jQuery.fx.interval.xml b/entries/jQuery.fx.interval.xml
index 5516d75c..2dfd1719 100644
--- a/entries/jQuery.fx.interval.xml
+++ b/entries/jQuery.fx.interval.xml
@@ -6,7 +6,7 @@
1.4.3
- This property is deprecated as of version 3.0, and has no effect in browsers that support the requestAnimationFrame
method.
+ This property is deprecated as of version 3.0, and has no effect in browsers that support the requestAnimationFrame
method.
On browsers that do not support requestAnimationFrame
, this property can be changed to adjust the interval at which animations will run. The default is 13 milliseconds.
Since jQuery uses one global interval, no animation should be running or all animations should stop for the change of this property to take effect.
diff --git a/entries/jQuery.getJSON.xml b/entries/jQuery.getJSON.xml
index b8a5ee49..11a26341 100644
--- a/entries/jQuery.getJSON.xml
+++ b/entries/jQuery.getJSON.xml
@@ -56,7 +56,7 @@ $.getJSON( "ajax/test.json", function( data ) {
The success
callback is passed the returned data, which is typically a JavaScript object or array as defined by the JSON structure and parsed using the $.parseJSON()
method. It is also passed the text status of the response.
As of jQuery 1.5, the success
callback function receives a "jqXHR" object (in jQuery 1.4, it received the XMLHttpRequest
object). However, since JSONP and cross-domain GET requests do not use XHR, in those cases the jqXHR
and textStatus
parameters passed to the success callback are undefined.
-
Important: As of jQuery 1.4, if the JSON file contains a syntax error, the request will usually fail silently. Avoid frequent hand-editing of JSON data for this reason. JSON is a data-interchange format with syntax rules that are stricter than those of JavaScript's object literal notation. For example, all strings represented in JSON, whether they are properties or values, must be enclosed in double-quotes. For details on the JSON format, see http://json.org/.
+
Important: As of jQuery 1.4, if the JSON file contains a syntax error, the request will usually fail silently. Avoid frequent hand-editing of JSON data for this reason. JSON is a data-interchange format with syntax rules that are stricter than those of JavaScript's object literal notation. For example, all strings represented in JSON, whether they are properties or values, must be enclosed in double-quotes. For details on the JSON format, see http://json.org/.
JSONP
If the URL includes the string "callback=?" (or similar, as defined by the server-side API), the request is treated as JSONP instead. See the discussion of the jsonp
data type in $.ajax()
for more details.
diff --git a/entries/jQuery.parseJSON.xml b/entries/jQuery.parseJSON.xml
index 054663df..d47eab4b 100644
--- a/entries/jQuery.parseJSON.xml
+++ b/entries/jQuery.parseJSON.xml
@@ -25,7 +25,7 @@
"NaN"
(NaN
cannot be represented in a JSON string; direct representation of Infinity
is also not permitted).
The JSON standard does not permit "control characters" such as a tab or newline. An example like $.parseJSON( '{ "testing":"1\t2\n3" }' )
will throw an error in most implementations because the JavaScript parser converts the string's tab and newline escapes into literal tab and newline; doubling the backslashes like "1\\t2\\n3"
yields expected results. This problem is often seen when injecting JSON into a JavaScript file from a server-side language such as PHP.
- Where the browser provides a native implementation of JSON.parse
, jQuery uses it to parse the string. For details on the JSON format, see http://json.org/.
+ Where the browser provides a native implementation of JSON.parse
, jQuery uses it to parse the string. For details on the JSON format, see http://json.org/.
Prior to jQuery 1.9, $.parseJSON
returned null
instead of throwing an error if it was passed an empty string, null
, or undefined
, even though those are not valid JSON.
diff --git a/entries/jQuery.support.xml b/entries/jQuery.support.xml
index c44b2b42..636ec72e 100644
--- a/entries/jQuery.support.xml
+++ b/entries/jQuery.support.xml
@@ -4,7 +4,7 @@
1.3
- A collection of properties that represent the presence of different browser features or bugs. Intended for jQuery's internal use; specific properties may be removed when they are no longer needed internally to improve page startup performance. For your own project's feature-detection needs, we strongly recommend the use of an external library such as Modernizr instead of dependency on properties in jQuery.support
.
+ A collection of properties that represent the presence of different browser features or bugs. Intended for jQuery's internal use; specific properties may be removed when they are no longer needed internally to improve page startup performance. For your own project's feature-detection needs, we strongly recommend the use of an external library such as Modernizr instead of dependency on properties in jQuery.support
.
diff --git a/entries/jQuery.xml b/entries/jQuery.xml
index 80e5bf19..a0ff76d1 100644
--- a/entries/jQuery.xml
+++ b/entries/jQuery.xml
@@ -177,9 +177,9 @@ $( myForm.elements ).hide();
By default, elements are created with an .ownerDocument
matching the document into which the jQuery library was loaded. Elements being injected into a different document should be created using that document, e.g., $("<p>hello iframe</p>", $("#myiframe").prop("contentWindow").document)
.
If the HTML is more complex than a single tag without attributes, as it is in the above example, the actual creation of the elements is handled by the browser's .innerHTML
mechanism. In most cases, jQuery creates a new <div>
element and sets the innerHTML
property of the element to the HTML snippet that was passed in. When the parameter has a single tag (with optional closing tag or quick-closing) — $( "<img />" )
or $( "<img>" )
, $( "<a></a>" )
or $( "<a>" )
— jQuery creates the element using the native JavaScript .createElement()
function.
When passing in complex HTML, some browsers may not generate a DOM that exactly replicates the HTML source provided. As mentioned, jQuery uses the browser's .innerHTML
property to parse the passed HTML and insert it into the current document. During this process, some browsers filter out certain elements such as <html>
, <title>
, or <head>
elements. As a result, the elements inserted may not be representative of the original string passed.
- Filtering isn't, however, limited to these tags. For example, Internet Explorer prior to version 8 will also convert all href
properties on links to absolute URLs, and Internet Explorer prior to version 9 will not correctly handle HTML5 elements without the addition of a separate compatibility layer.
+ Filtering isn't, however, limited to these tags. For example, Internet Explorer prior to version 8 will also convert all href
properties on links to absolute URLs, and Internet Explorer prior to version 9 will not correctly handle HTML5 elements without the addition of a separate compatibility layer.
To ensure cross-platform compatibility, the snippet must be well-formed. Tags that can contain other elements should be paired with a closing tag:
- $( "<a href='http://jquery.com'></a>" );
+ $( "<a href='https://jquery.com'></a>" );
Tags that cannot contain elements may be quick-closed or not:
$( "<img>" );
diff --git a/entries/keypress.xml b/entries/keypress.xml
index 96b6b6c6..0fd28cf3 100644
--- a/entries/keypress.xml
+++ b/entries/keypress.xml
@@ -61,7 +61,7 @@ $( "#other" ).click(function() {
- Show the event object when a key is pressed in the input. Note: This demo relies on a simple $.print() plugin (http://api.jquery.com/resources/events.js) for the event object's output.
+ Show the event object when a key is pressed in the input. Note: This demo relies on a simple $.print() plugin (https://api.jquery.com/resources/events.js) for the event object's output.