The result of this call is a red background on items A, B, 1, 2, 3, and C. Even though item II matches the selector expression, it is not included in the results; only descendants are considered candidates for the match.
-
Unlike in the rest of the tree traversal methods, the selector expression is required in a call to .find(). If we need to retrieve all of the descendant elements, we can pass in the universal selector '*' to accomplish this.
+
Unlike most of the tree traversal methods, the selector expression is required in a call to .find(). If we need to retrieve all of the descendant elements, we can pass in the universal selector '*' to accomplish this.
Selector context is implemented with the .find()method; therefore, $( "li.item-ii" ).find( "li" ) is equivalent to $( "li", "li.item-ii" ).
As of jQuery 1.6, we can also filter the selection with a given jQuery collection or element. With the same nested list as above, if we start with:
Since .after() can accept any number of additional arguments, the same result can be achieved by passing in the three <div>s as three separate arguments, like so: $( "p" ).first().after( $newdiv1, newdiv2, existingdiv1 ). The type and number of arguments will largely depend on the elements that are collected in the code.
+ Inserts some HTML after all paragraphs.
Since .append() can accept any number of additional arguments, the same result can be achieved by passing in the three <div>s as three separate arguments, like so: $('body').append( $newdiv1, newdiv2, existingdiv1 ). The type and number of arguments will largely depend on how you collect the elements in your code.
+ Appends some HTML to all paragraphs.If there is more than one target element, however, cloned copies of the inserted element will be created for each target after the first, and that new set (the original element plus clones) is returned.
Before jQuery 1.9, the append-to-single-element case did not create a new set, but instead returned the original set which made it difficult to use the .end() method reliably when being used with an unknown number of elements.
+ Append all spans to the element with the ID "foo" (Check append() documentation for more examples)
Since .before() can accept any number of additional arguments, the same result can be achieved by passing in the three <div>s as three separate arguments, like so: $( "p" ).first().before( $newdiv1, newdiv2, existingdiv1 ). The type and number of arguments will largely depend on how you collect the elements in your code.
+ Inserts some HTML before all paragraphs.
This method uses the browser's innerHTML property. Some browsers may not return HTML that exactly replicates the HTML source in an original document. For example, Internet Explorer sometimes leaves off the quotes around attribute values if they contain only alphanumeric characters.
+ Click a paragraph to convert it from html to text.If there is more than one target element, however, cloned copies of the inserted element will be created for each target after the first, and that new set (the original element plus clones) is returned.
Before jQuery 1.9, the append-to-single-element case did not create a new set, but instead returned the original set which made it difficult to use the .end() method reliably when being used with an unknown number of elements.
+ Insert all paragraphs after an element with id of "foo". Same as $( "#foo" ).after( "p" )If there is more than one target element, however, cloned copies of the inserted element will be created for each target after the first, and that new set (the original element plus clones) is returned.
Before jQuery 1.9, the append-to-single-element case did not create a new set, but instead returned the original set which made it difficult to use the .end() method reliably when being used with an unknown number of elements.
+ Insert all paragraphs before an element with id of "foo". Same as $( "#foo" ).before( "p" )
Since .prepend() can accept any number of additional arguments, the same result can be achieved by passing in the three <div>s as three separate arguments, like so: $( "body" ).prepend( $newdiv1, newdiv2, existingdiv1 ). The type and number of arguments will largely depend on how you collect the elements in your code.
+ Prepends some HTML to all paragraphs.
If there is more than one target element, however, cloned copies of the inserted element will be created for each target after the first.
+ Prepend all spans to the element with the ID "foo" (Check .prepend() documentation for more examples)
If is called on an unordered list (<ul>) and its <li> elements have position (relative, absolute, or fixed), the effect may not work properly in IE6 through at least IE9 unless the <ul> has "layout." To remedy the problem, add the position: relative; and zoom: 1; CSS declarations to the ul.
+
+ By design, any jQuery constructor or method that accepts an HTML string — jQuery(), .append(), .after(), etc. — can potentially execute code. This can occur by injection of script tags or use of HTML attributes that execute code (for example, <img onload="">). Do not use these methods to insert strings obtained from untrusted sources such as URL query parameters, cookies, or form inputs. Doing so can introduce cross-site-scripting (XSS) vulnerabilities. Remove or escape any user input before adding content to the document.
+
From f82164f3b3d8eaca43dad36bd85afadba832423d Mon Sep 17 00:00:00 2001
From: Dave Methvin
Date: Sun, 26 Jan 2014 20:21:56 -0500
Subject: [PATCH 003/699] Fix broken link to jQuery type in .add(), closes
gh-320
---
entries/add.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/entries/add.xml b/entries/add.xml
index ba7bd723..cf110550 100644
--- a/entries/add.xml
+++ b/entries/add.xml
@@ -21,7 +21,7 @@
1.3.2
-
+ An existing jQuery object to add to the set of matched elements.
From 3fe6131a8747de97a749257fc752f32c9b2f723e Mon Sep 17 00:00:00 2001
From: Dave Methvin
Date: Sun, 26 Jan 2014 20:42:01 -0500
Subject: [PATCH 004/699] Extend: Do not extend cyclical data structures,
closes gh-332
---
entries/jQuery.extend.xml | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/entries/jQuery.extend.xml b/entries/jQuery.extend.xml
index 594a1b75..958e9d14 100644
--- a/entries/jQuery.extend.xml
+++ b/entries/jQuery.extend.xml
@@ -37,8 +37,8 @@
The merge performed by $.extend() is not recursive by default; if a property of the first object is itself an object or array, it will be completely overwritten by a property with the same key in the second or subsequent object. The values are not merged. This can be seen in the example below by examining the value of banana. However, by passing true for the first function argument, objects will be recursively merged.
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.
-
For needs that fall outside of this behavior, write a custom extend method instead.
+
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.
Merge two objects, modifying the first.
From 4cf1841161e07369ac7d273da669ab00d594b327 Mon Sep 17 00:00:00 2001
From: Dave Methvin
Date: Sun, 26 Jan 2014 20:56:21 -0500
Subject: [PATCH 005/699] Types: Clarify behavior of jQuery-object-returning
methods, ref gh-338
---
pages/Types.html | 2 ++
1 file changed, 2 insertions(+)
diff --git a/pages/Types.html b/pages/Types.html
index 3ab239c0..e8a53c47 100644
--- a/pages/Types.html
+++ b/pages/Types.html
@@ -585,6 +585,8 @@
jQuery
Most frequently, you will use the jQuery() function to create a jQuery object. jQuery() can also be accessed by its familiar single-character alias of $(), unless you have called jQuery.noConflict() to disable this option. Many jQuery methods return the jQuery object itself, so that method calls can be chained:
+
In API calls that return jQuery, the value returned will be the original jQuery object unless otherwise documented by that API. API methods such as .filter() or .not() modify their incoming set and thus return a new jQuery object.
+
Whenever you use a "destructive" jQuery method that potentially changes the set of elements in the jQuery object, such as .filter() or .find(), that method actually returns a new jQuery object with the resulting elements. To return to the previous jQuery object, you use the .end() method.
From b03d09a676acda8234164048a79c378272e4d31b Mon Sep 17 00:00:00 2001
From: Dave Methvin
Date: Sun, 26 Jan 2014 21:11:06 -0500
Subject: [PATCH 006/699] CSS: Clarify computed style, closes gh-322
---
entries/css.xml | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/entries/css.xml b/entries/css.xml
index ec95b3cc..6a5391cc 100644
--- a/entries/css.xml
+++ b/entries/css.xml
@@ -15,10 +15,11 @@
An array of one or more CSS properties.
- Get the value of style properties for the first element in the set of matched elements.
+ Get the computed style properties for the first element in the set of matched elements.
The .css() method is a convenient way to get a style property from the first matched element, especially in light of the different ways browsers access most of those properties (the getComputedStyle() method in standards-based browsers versus the currentStyle and runtimeStyle properties in Internet Explorer) and the different terms browsers use for certain properties. For example, Internet Explorer's DOM implementation refers to the float property as styleFloat, while W3C standards-compliant browsers refer to it as cssFloat. For consistency, you can simply use "float", and jQuery will translate it to the correct value for each browser.
-
Also, jQuery can equally interpret the CSS and DOM formatting of multiple-word properties. For example, jQuery understands and returns the correct value for both .css( "background-color" ) and .css( "backgroundColor" ). Different browsers may return CSS color values that are logically but not textually equal, e.g., #FFF, #ffffff, and rgb(255,255,255).
+
Also, jQuery can equally interpret the CSS and DOM formatting of multiple-word properties. For example, jQuery understands and returns the correct value for both .css( "background-color" ) and .css( "backgroundColor" ).
+
Note that the computed style of an element may not be the same as the value specified for that element in a style sheet. For example, computed styles of dimensions are almost always pixels, but they can be specified as em, ex, px or % in a style sheet. Different browsers may return CSS color values that are logically but not textually equal, e.g., #FFF, #ffffff, and rgb(255,255,255).
Retrieval of shorthand CSS properties (e.g., margin, background, border), although functional with some browsers, is not guaranteed. For example, if you want to retrieve the rendered border-width, use: $( elem ).css( "borderTopWidth" ), $( elem ).css( "borderBottomWidth" ), and so on.
As of jQuery 1.9, passing an array of style properties to .css() will result in an object of property-value pairs. For example, to retrieve all four rendered border-width values, you could use $( elem ).css([ "borderTopWidth", "borderRightWidth", "borderBottomWidth", "borderLeftWidth" ]).
From e482af6a58b0f41125a995150e5e6d1bcc2075a3 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Timoth=C3=A9e=20Boucher?=
Date: Sun, 26 Jan 2014 21:37:28 -0500
Subject: [PATCH 007/699] append() clones for all elements but the last one,
not first. Closes #344
---
entries/append.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/entries/append.xml b/entries/append.xml
index 7804eee1..d8b4ebb9 100644
--- a/entries/append.xml
+++ b/entries/append.xml
@@ -66,7 +66,7 @@ $( ".container" ).append( $( "h2" ) );
<h2>Greetings</h2>
</div>
-
If there is more than one target element, however, cloned copies of the inserted element will be created for each target after the first.
+
If there is more than one target element, however, cloned copies of the inserted element will be created for each target except for the last one.
Additional Arguments
Similar to other content-adding methods such as .prepend() and .before(), .append() also supports passing in multiple arguments as input. Supported input includes DOM elements, jQuery objects, HTML strings, and arrays of DOM elements.
For example, the following will insert two new <div>s and an existing <div> as the last three child nodes of the body:
From 2ee862f48b3c1597f0ccff71fe8641e99fd18cdb Mon Sep 17 00:00:00 2001
From: Aurelio De Rosa
Date: Sun, 26 Jan 2014 22:42:06 -0500
Subject: [PATCH 008/699] Update bind() - preventBubble argument is optional.
Closes #416
---
entries/bind.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/entries/bind.xml b/entries/bind.xml
index 8daadb80..3b00923b 100644
--- a/entries/bind.xml
+++ b/entries/bind.xml
@@ -21,7 +21,7 @@
An object containing data that will be passed to the event handler.
-
+ Setting the third argument to false will attach a function that prevents the default action from occurring and stops the event from bubbling. The default is true.
From cbebba7e889f16eabb04960ebe50a94292a192af Mon Sep 17 00:00:00 2001
From: Aurelio De Rosa
Date: Sun, 26 Jan 2014 22:46:09 -0500
Subject: [PATCH 009/699] Update is(). Argument can take more than one element.
Closes #415
---
entries/is.xml | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/entries/is.xml b/entries/is.xml
index 86715968..20ebd45d 100644
--- a/entries/is.xml
+++ b/entries/is.xml
@@ -21,8 +21,8 @@
1.6
-
- An element to match the current set of elements against.
+
+ One or more elements to match the current set of elements against.Check the current matched set of elements against a selector, element, or jQuery object and return true if at least one of these elements matches the given arguments.
From e47e9746b09bd3b54f7ceb92a043bc4fcf5d6cea Mon Sep 17 00:00:00 2001
From: Karl Swedberg
Date: Sun, 26 Jan 2014 22:47:18 -0500
Subject: [PATCH 010/699] 1.11.0
---
package.json | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/package.json b/package.json
index 3efc2069..4c711514 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.10.13",
+ "version": "1.11.0",
"homepage": "https://github.com/jquery/api.jquery.com",
"author": {
"name": "jQuery Foundation (https://jquery.org/)"
From 834e5503807fdbb58ff651e7da5b7ddeb2aef060 Mon Sep 17 00:00:00 2001
From: davidfregoli
Date: Wed, 29 Jan 2014 07:58:32 -0500
Subject: [PATCH 011/699] Update SOP note in notes.xsl. Closes #398
---
notes.xsl | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/notes.xsl b/notes.xsl
index 5925cd3f..c14473ee 100644
--- a/notes.xsl
+++ b/notes.xsl
@@ -26,7 +26,7 @@
Since the .live() method handles events once they have propagated to the top of the document, it is not possible to stop propagation of live events. Similarly, events handled by .delegate() will propagate to the elements to which they are delegated; event handlers bound on any elements below it in the DOM tree will already have been executed by the time the delegated event handler is called. These handlers, therefore, may prevent the delegated handler from triggering by calling event.stopPropagation() or returning false.
- Due to browser security restrictions, most "Ajax" requests are subject to the same origin policy; the request can not successfully retrieve data from a different domain, subdomain, or protocol.
+ Due to browser security restrictions, most "Ajax" requests are subject to the same origin policy; the request can not successfully retrieve data from a different domain, subdomain, port, or protocol.
Script and JSONP requests are not subject to the same origin policy restrictions.
From dc83917209b4a637dcadb2c70692a3ea0490ea97 Mon Sep 17 00:00:00 2001
From: Karl Swedberg
Date: Sat, 8 Feb 2014 14:07:42 -0500
Subject: [PATCH 012/699] .get() and .toArray(): Remove "DOM" from description.
Fixes gh-443.
---
entries/get.xml | 4 ++--
entries/toArray.xml | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/entries/get.xml b/entries/get.xml
index d9e7428f..59457611 100644
--- a/entries/get.xml
+++ b/entries/get.xml
@@ -9,7 +9,7 @@
A zero-based integer indicating which element to retrieve.
- Retrieve one of the DOM elements matched by the jQuery object.
+ Retrieve one of the elements matched by the jQuery object.
The .get() method grants us access to the DOM nodes underlying each jQuery object. Consider a simple unordered list:
@@ -71,7 +71,7 @@ $( "*", document.body ).click(function( event ) {
1.0
- Retrieve the DOM elements matched by the jQuery object.
+ Retrieve the elements matched by the jQuery object.
Consider a simple unordered list:
diff --git a/entries/toArray.xml b/entries/toArray.xml
index 73991abe..dc57da06 100644
--- a/entries/toArray.xml
+++ b/entries/toArray.xml
@@ -4,7 +4,7 @@
1.4
- Retrieve all the DOM elements contained in the jQuery set, as an array.
+ Retrieve all the elements contained in the jQuery set, as an array.
.toArray() returns all of the elements in the jQuery set:
@@ -16,7 +16,7 @@ alert( $( "li" ).toArray() );
- Selects all divs in the document and returns the DOM Elements as an Array, then uses the built-in reverse-method to reverse that array.
+ Select all divs in the document and return the DOM Elements as an Array; then use the built-in reverse() method to reverse that array.
Date: Sat, 8 Feb 2014 14:10:38 -0500
Subject: [PATCH 013/699] 1.11.1
---
package.json | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/package.json b/package.json
index 4c711514..9f282076 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.11.0",
+ "version": "1.11.1",
"homepage": "https://github.com/jquery/api.jquery.com",
"author": {
"name": "jQuery Foundation (https://jquery.org/)"
From a7a562ca732e75062fbdc86526bd9f2b30f327b0 Mon Sep 17 00:00:00 2001
From: Dave Methvin
Date: Sat, 8 Feb 2014 14:16:53 -0500
Subject: [PATCH 014/699] parseHTML: Add security warning, closes gh-59
---
entries/jQuery.parseHTML.xml | 2 ++
1 file changed, 2 insertions(+)
diff --git a/entries/jQuery.parseHTML.xml b/entries/jQuery.parseHTML.xml
index a6e3bab6..b0d245e6 100644
--- a/entries/jQuery.parseHTML.xml
+++ b/entries/jQuery.parseHTML.xml
@@ -17,6 +17,8 @@
jQuery.parseHTML uses a native DOM element creation function to convert the string to a set of DOM elements, which can then be inserted into the document.
By default, the context is the current document if not specified or given as null or undefined. If the HTML was to be used in another document such as an iframe, that frame's document could be used.
+
Security Considerations
+
Most jQuery APIs that accept HTML strings will run scripts that are included in the HTML. jQuery.parseHTML does not run script in the parsed HTML unless keepScripts is explicitly true. However, it is still possible in most environments to execute script indirectly, for example via the <img onerror> attribute. The caller should be aware of this and guard against it by cleaning or escaping any untrusted inputs from sources such as the URL or cookies. For future compatibility, callers should not depend on the ability to run any script content when keepScripts is unspecified or false.
Create an array of Dom nodes using an HTML string and insert it into a div.
From 0e31d5adf9e5b5cd95b91c68cd73e9f766588d27 Mon Sep 17 00:00:00 2001
From: Dave Methvin
Date: Sat, 8 Feb 2014 14:46:32 -0500
Subject: [PATCH 015/699] Dimensions: values are non-integer and unreliable
zoomed. Fixes gh-76, gh-103
---
entries/height.xml | 3 ++-
entries/innerHeight.xml | 3 ++-
entries/innerWidth.xml | 3 ++-
entries/offset.xml | 5 +++--
entries/outerHeight.xml | 5 +++--
entries/outerWidth.xml | 3 ++-
entries/position.xml | 3 ++-
entries/width.xml | 3 ++-
notes.xsl | 3 +++
9 files changed, 21 insertions(+), 10 deletions(-)
diff --git a/entries/height.xml b/entries/height.xml
index 3632ed02..dd809c0f 100644
--- a/entries/height.xml
+++ b/entries/height.xml
@@ -1,7 +1,7 @@
Get the current computed height for the first element in the set of matched elements or set the height of every matched element.
-
+ .height()1.0
@@ -22,6 +22,7 @@ $( document ).height(); // returns height of HTML document
Note: Although style and script tags will report a value for .width() or height() when absolutely positioned and given display:block, it is strongly discouraged to call those methods on these tags. In addition to being a bad practice, the results may also prove unreliable.
+ Show various heights. Note the values are from the iframe so might be smaller than you expected. The yellow highlight shows the iframe body.
-
+.innerHeight()1.2.6
@@ -12,6 +12,7 @@
+ Get the innerHeight of a paragraph.
-
+.innerWidth()1.2.6
@@ -12,6 +12,7 @@
+ Get the innerWidth of a paragraph.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.
-
+
+ Access the offset of the second paragraph:1.4
- An object containing the properties top and left, which are integers indicating the new top and left coordinates for the elements.
+ An object containing the properties top and left, which are numbers indicating the new top and left coordinates for the elements.
diff --git a/entries/outerHeight.xml b/entries/outerHeight.xml
index 67816672..529b0be7 100644
--- a/entries/outerHeight.xml
+++ b/entries/outerHeight.xml
@@ -1,5 +1,5 @@
-
+.outerHeight()1.2.6
@@ -7,7 +7,7 @@
A Boolean indicating whether to include the element's margin in the calculation.
- Get the current computed height for the first element in the set of matched elements, including padding, border, and optionally margin. Returns an integer (without "px") representation of the value or null if called on an empty set of elements.
+ Get the current computed height for the first element in the set of matched elements, including padding, border, and optionally margin. Returns a number (without "px") representation of the value or null if called on an empty set of elements.
The top and bottom padding and border are always included in the .outerHeight() calculation; if the includeMargin argument is set to true, the margin (top and bottom) is also included.
This method is not applicable to window and document objects; for these, use .height() instead.
@@ -15,6 +15,7 @@
+ Get the outerHeight of a paragraph.
-
+.outerWidth()1.2.6
@@ -16,6 +16,7 @@
+ Get the outerWidth of a paragraph.Note: jQuery does not support getting the position coordinates of hidden elements or accounting for borders, margins, or padding set on the body element.
-
+
+ Access the position of the second paragraph:Get the current computed width for the first element in the set of matched elements or set the width of every matched element.
-
+ .width()1.0
@@ -22,6 +22,7 @@ $( document ).width();
Note that .width() will always return the content width, regardless of the value of the CSS box-sizing property. As of jQuery 1.8, this may require retrieving the CSS width plus box-sizing property and then subtracting any potential border and padding on each element when the element has box-sizing: border-box. To avoid this penalty, use .css( "width" ) rather than .width().
+ Show various widths. Note the values are from the iframe so might be smaller than you expected. The yellow highlight shows the iframe body.
+
+ The numbers returned by dimensions-related APIs, including , may be fractional in some cases. Code should not assume it is an integer. Also, dimensions may be incorrect when the page is zoomed by the user; browsers do not expose an API to detect this condition.
+
Selected elements are in the order of their appearance in the document.
From 501491bd4139a1771a2c2dfd3653b72d596092cb Mon Sep 17 00:00:00 2001
From: Dave Methvin
Date: Sat, 8 Feb 2014 14:57:35 -0500
Subject: [PATCH 016/699] Note new sane 1.9+ behavior for disconnected elems,
ref gh-240
---
entries/after.xml | 1 +
entries/before.xml | 1 +
entries/replaceWith.xml | 12 +-----------
notes.xsl | 2 ++
4 files changed, 5 insertions(+), 11 deletions(-)
diff --git a/entries/after.xml b/entries/after.xml
index 8c0fe2c3..b55e3e96 100644
--- a/entries/after.xml
+++ b/entries/after.xml
@@ -100,6 +100,7 @@ $( "p" ).first().after( $newdiv1, [ newdiv2, existingdiv1 ] );
Since .after() can accept any number of additional arguments, the same result can be achieved by passing in the three <div>s as three separate arguments, like so: $( "p" ).first().after( $newdiv1, newdiv2, existingdiv1 ). The type and number of arguments will largely depend on the elements that are collected in the code.
+ Inserts some HTML after all paragraphs.
diff --git a/entries/before.xml b/entries/before.xml
index 13bfce2c..16738d29 100644
--- a/entries/before.xml
+++ b/entries/before.xml
@@ -80,6 +80,7 @@ $( "p" ).first().before( newdiv1, [ newdiv2, existingdiv1 ] );
Since .before() can accept any number of additional arguments, the same result can be achieved by passing in the three <div>s as three separate arguments, like so: $( "p" ).first().before( $newdiv1, newdiv2, existingdiv1 ). The type and number of arguments will largely depend on how you collect the elements in your code.
+ Inserts some HTML before all paragraphs.
diff --git a/entries/replaceWith.xml b/entries/replaceWith.xml
index 17e81829..0f01e47b 100644
--- a/entries/replaceWith.xml
+++ b/entries/replaceWith.xml
@@ -63,18 +63,8 @@ $( "div.third" ).replaceWith( $( ".first" ) );
This example demonstrates that the selected element replaces the target by being moved from its old location, not by being cloned.
The .replaceWith() method, like most jQuery methods, returns the jQuery object so that other methods can be chained onto it. However, it must be noted that the original jQuery object is returned. This object refers to the element that has been removed from the DOM, not the new element that has replaced it.
-
As of jQuery 1.4, .replaceWith() can also work on disconnected DOM nodes. For example, with the following code, .replaceWith() returns a jQuery set containing only a paragraph.:
-
-$( "<div/>" ).replaceWith( "<p></p>" );
-
-
The .replaceWith() method can also take a function as its argument:
This results in <div class="container"> being replaced by its three child <div>s. The return value of the function may be an HTML string, DOM element, or jQuery object.
+ On click, replace the button with a div containing the same word.
The numbers returned by dimensions-related APIs, including , may be fractional in some cases. Code should not assume it is an integer. Also, dimensions may be incorrect when the page is zoomed by the user; browsers do not expose an API to detect this condition.
+
+ Prior to jQuery 1.9, would attempt to add or change nodes in the current jQuery set if the first node in the set was not connected to a document, and in those cases return a new jQuery set rather than the original set. The method might or might not return a new result depending on the number or connectedness of its arguments! As of jQuery 1.9, these methods always return the original unmodified set and attempting to use .after(), .before(), or .replaceWith() on a node without a parent has no effect--that is, neither the set or the nodes it contains are changed.
Selected elements are in the order of their appearance in the document.
From 276c9d69b792086aebbd2217377acd8db5e82d34 Mon Sep 17 00:00:00 2001
From: Karl Swedberg
Date: Sat, 8 Feb 2014 15:03:10 -0500
Subject: [PATCH 017/699] Notes.xsl: Touch up note about manipulation of
disconnected nodes
---
notes.xsl | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/notes.xsl b/notes.xsl
index 092fa484..6f1029d4 100644
--- a/notes.xsl
+++ b/notes.xsl
@@ -3,8 +3,9 @@
The numbers returned by dimensions-related APIs, including , may be fractional in some cases. Code should not assume it is an integer. Also, dimensions may be incorrect when the page is zoomed by the user; browsers do not expose an API to detect this condition.
+
- Prior to jQuery 1.9, would attempt to add or change nodes in the current jQuery set if the first node in the set was not connected to a document, and in those cases return a new jQuery set rather than the original set. The method might or might not return a new result depending on the number or connectedness of its arguments! As of jQuery 1.9, these methods always return the original unmodified set and attempting to use .after(), .before(), or .replaceWith() on a node without a parent has no effect--that is, neither the set or the nodes it contains are changed.
+ Prior to jQuery 1.9, would attempt to add or change nodes in the current jQuery set if the first node in the set was not connected to a document, and in those cases return a new jQuery set rather than the original set. The method might or might not have returned a new result depending on the number or connectedness of its arguments! As of jQuery 1.9, .after(), .before(), and .replaceWith() always return the original unmodified set. Attempting to use these methods on a node without a parent has no effect—that is, neither the set nor the nodes it contains are changed.
Selected elements are in the order of their appearance in the document.
From 258b3dcb5f22d091c76fc6dac114f4505f1e6be8 Mon Sep 17 00:00:00 2001
From: Karl Swedberg
Date: Sat, 8 Feb 2014 15:03:53 -0500
Subject: [PATCH 018/699] 1.11.2
---
package.json | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/package.json b/package.json
index 9f282076..d57081d2 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.11.1",
+ "version": "1.11.2",
"homepage": "https://github.com/jquery/api.jquery.com",
"author": {
"name": "jQuery Foundation (https://jquery.org/)"
From ece34cf78bcd213546c4bdd99ffd8c35601a1602 Mon Sep 17 00:00:00 2001
From: Dave Methvin
Date: Tue, 11 Feb 2014 14:11:19 -0800
Subject: [PATCH 019/699] More emphasis about element order with .add() and
jQuery()
Fixes gh-240
Closes #435
---
entries/add.xml | 2 +-
entries/jQuery.xml | 5 ++---
2 files changed, 3 insertions(+), 4 deletions(-)
diff --git a/entries/add.xml b/entries/add.xml
index cf110550..e93025df 100644
--- a/entries/add.xml
+++ b/entries/add.xml
@@ -37,7 +37,7 @@
Add elements to the set of matched elements.
Given a jQuery object that represents a set of DOM elements, the .add() method constructs a new jQuery object from the union of those elements and the ones passed into the method. The argument to .add() can be pretty much anything that $() accepts, including a jQuery selector expression, references to DOM elements, or an HTML snippet.
-
Do not assume that this method appends the elements to the existing collection in the order they are passed to the .add() method. When all elements are members of the same document, the resulting collection from .add() will be sorted in document order; that is, in order of each element's appearance in the document. If the collection consists of elements from different documents or ones not in any document, the sort order is undefined. To create a jQuery object with elements in a well-defined order, use the $(array_of_DOM_elements) signature.
+
Do not assume that this method appends the elements to the existing collection in the order they are passed to the .add() method. When all elements are members of the same document, the resulting collection from .add() will be sorted in document order; that is, in order of each element's appearance in the document. If the collection consists of elements from different documents or ones not in any document, the sort order is undefined. To create a jQuery object with elements in a well-defined order and without sorting overhead, use the $(array_of_DOM_elements) signature.
The updated set of elements can be used in a following (chained) method, or assigned to a variable for later use. For example:
Internally, selector context is implemented with the .find() method, so $( "span", this ) is equivalent to $( this ).find( "span" ).
Using DOM elements
-
The second and third formulations of this function create a jQuery object using one or more DOM elements that were already selected in some other way.
-
Note: These formulations are meant to consume only DOM elements; feeding mixed data to the elementArray form is particularly discouraged.
-
A common use of this facility is to call jQuery methods on an element that has been passed to a callback function through the keyword this:
+
The second and third formulations of this function create a jQuery object using one or more DOM elements that were already selected in some other way. When passing an array, each element must be a DOM element; mixed data is not supported. A jQuery object is created from the array elements in the order they appeared in the array; unlike most other multi-element jQuery operations, the elements are not sorted in DOM order.
+
A common use of single-DOM-element construction is to call jQuery methods on an element that has been passed to a callback function through the keyword this:
Elements with visibility: hidden or opacity: 0 are considered to be visible, since they still consume space in the layout. During animations that hide an element, the element is considered to be visible until the end of the animation.
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.
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.
Elements with visibility: hidden or opacity: 0 are considered visible, since they still consume space in the layout.
Elements that are not in a document are considered to be hidden; 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.
During animations that hide an element, the element is considered to be visible until the end of the animation. During animations to show an element, the element is considered to be visible at the start at the animation.
-
How :visible is calculated was changed in jQuery 1.3.2. The release notes outline the changes in more detail.
+
How :visible is calculated was changed in jQuery 1.3.2. The release notes outline the changes in more detail.
From 0051b225f73aae7b719afa2b8d2da2363a0c4082 Mon Sep 17 00:00:00 2001
From: Dave Methvin
Date: Tue, 11 Feb 2014 14:32:56 -0800
Subject: [PATCH 021/699] inner/outer height/width setters
Fixes gh-98
Closes #431
---
entries/innerWidth.xml | 65 ++++++++++++++++++++++++++++++++++++++++--
1 file changed, 63 insertions(+), 2 deletions(-)
diff --git a/entries/innerWidth.xml b/entries/innerWidth.xml
index dbfe77bc..c2e30f3d 100644
--- a/entries/innerWidth.xml
+++ b/entries/innerWidth.xml
@@ -1,10 +1,12 @@
-
+
+ Get the current computed inner width (including padding but not border) for the first element in the set of matched elements or set the inner width of every matched element.
+.innerWidth()1.2.6
- Get the current computed width for the first element in the set of matched elements, including padding but not border.
+ Get the current computed inner width for the first element in the set of matched elements, including padding but not border.
This method returns the width of the element, including left and right padding, in pixels.
This method is not applicable to window and document objects; for these, use .width() instead.
@@ -36,3 +38,62 @@ $( "p:last" ).text( "innerWidth:" + p.innerWidth() );
+
+
+
+ 1.8.0
+
+
+
+ A number representing the number of pixels, or a number along with an optional unit of measure appended (as a string).
+
+
+
+ 1.8.0
+
+ A function returning the inner width (including padding but not border) to set. Receives the index position of the element in the set and the old inner width as arguments. Within the function, this refers to the current element in the set.
+
+
+Set the CSS inner width of each element in the set of matched elements.
+
+
When calling .innerWidth("value"), the value can be either a string (number and unit) or a number. If only a number is provided for the value, jQuery assumes a pixel unit. If a string is provided, however, any valid CSS measurement may be used for the width (such as 100px, 50%, or auto). Note that in modern browsers, the CSS width property does not include padding, border, or margin, unless the box-sizing CSS property is used.
+
If no explicit unit is specified (like "em" or "%") then "px" is assumed.
+
+
+ Change the inner width of each div the first time it is clicked (and change its color).
+
+
+ d
+
If there is more than one target element, however, cloned copies of the inserted element will be created for each target after the first.
+
Important: If there is more than one target element, however, cloned copies of the inserted element will be created for each target except for the last one.
Inserting Disconnected DOM nodes
As of jQuery 1.4, .before() and .after() will also work on disconnected DOM nodes. For example, given the following code:
If there is more than one target element, however, cloned copies of the inserted element will be created for each target except for the last one.
+
Important: If there is more than one target element, however, cloned copies of the inserted element will be created for each target except for the last one.
Additional Arguments
Similar to other content-adding methods such as .prepend() and .before(), .append() also supports passing in multiple arguments as input. Supported input includes DOM elements, jQuery objects, HTML strings, and arrays of DOM elements.
For example, the following will insert two new <div>s and an existing <div> as the last three child nodes of the body:
If there is more than one target element, however, cloned copies of the inserted element will be created for each target after the first.
+
Important: If there is more than one target element, however, cloned copies of the inserted element will be created for each target except for the last one.
In jQuery 1.4, .before() and .after() will also work on disconnected DOM nodes:
Important: If there is more than one target element, however, cloned copies of the inserted element will be created for each target after the first.
+
Important: If there is more than one target element, however, cloned copies of the inserted element will be created for each target except for the last one.
Additional Arguments
Similar to other content-adding methods such as .append() and .before(), .prepend() also supports passing in multiple arguments as input. Supported input includes DOM elements, jQuery objects, HTML strings, and arrays of DOM elements.
For example, the following will insert two new <div>s and an existing <div> as the first three child nodes of the body:
This method is most useful for attaching event handlers to an element where the context is pointing back to a different object. Additionally, jQuery makes sure that even if you bind the function returned from jQuery.proxy() it will still unbind the correct function if passed the original.
Be aware, however, that jQuery's event binding subsystem assigns a unique id to each event handling function in order to track it when it is used to specify the function to be unbound. The function represented by jQuery.proxy() is seen as a single function by the event subsystem, even when it is used to bind different contexts. To avoid unbinding the wrong handler, use a unique event namespace for binding and unbinding (e.g., "click.myproxy1") rather than specifying the proxied function during unbinding.
-
As of jQuery 1.6, any number of additional arguments may supplied to $.proxy(), and they will be passed to the function whose context will be changed.
+
As of jQuery 1.6, any number of additional arguments may be supplied to $.proxy(), and they will be passed to the function whose context will be changed.
As of jQuery 1.9, when the context is null or undefined the proxied function will be called with the same this object as the proxy was called with. This allows $.proxy() to be used to partially apply the arguments of a function without changing the context.
The Date type is a JavaScript object that represents a single moment in time. Date objects are instantiated using their constructor function, which by default creates an object that represents the current date and time.
+
+
+new Date();
+
+
To create a Date object for an alternative date and time, pass numeric arguments in the following order: year, month, day, minute, second, millisecond - although note that the month is zero-based, whereas the other arguments are one-based. The following creates a Date object representing January 1st, 2014 at 8:15.
+
+
+new Date( 2014, 0, 1, 8, 15 );
+
+
Function
A function in JavaScript can be either named or anonymous. Any function can be assigned to a variable or passed to a method, but passing member functions this way can cause them to be called in the context of another object (i.e. with a different "this" object).
To create a Date object for an alternative date and time, pass numeric arguments in the following order: year, month, day, minute, second, millisecond - although note that the month is zero-based, whereas the other arguments are one-based. The following creates a Date object representing January 1st, 2014 at 8:15.
+
To create a Date object for an alternative date and time, pass numeric arguments in the following order: year, month, day, minute, second, millisecond — although note that the month is zero-based, whereas the other arguments are one-based. The following creates a Date object representing January 1st, 2014, at 8:15.
new Date( 2014, 0, 1, 8, 15 );
From c6d5da3b86dd3b8c5aff197058b1490e931aadf2 Mon Sep 17 00:00:00 2001
From: Karl Swedberg
Date: Mon, 17 Feb 2014 23:10:25 -0500
Subject: [PATCH 028/699] 1.11.4
---
package.json | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/package.json b/package.json
index d397cfd9..907a22e2 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.11.3",
+ "version": "1.11.4",
"homepage": "https://github.com/jquery/api.jquery.com",
"author": {
"name": "jQuery Foundation (https://jquery.org/)"
From 356fbe9b47ac80afb22d203dfcb62850c72ef5ec Mon Sep 17 00:00:00 2001
From: Aurelio De Rosa
Date: Wed, 26 Feb 2014 16:13:57 -0500
Subject: [PATCH 029/699] get.xml: Add note about returning undefined when
number out of bounds
---
entries/get.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/entries/get.xml b/entries/get.xml
index 59457611..5698760d 100644
--- a/entries/get.xml
+++ b/entries/get.xml
@@ -11,7 +11,7 @@
Retrieve one of the elements matched by the jQuery object.
-
The .get() method grants us access to the DOM nodes underlying each jQuery object. Consider a simple unordered list:
+
The .get() method grants access to the DOM nodes underlying each jQuery object. If the value of index is out of bounds — less than 0 or equal to or greater than the number of elements — it returns undefined. Consider a simple unordered list:
When the browser triggers an event or other JavaScript calls jQuery's .trigger() method, jQuery passes the handler an event object it can use to analyze and change the status of the event. This object is a normalized subset of data provided by the browser; the browser's unmodified native event object is available in event.originalEvent. For example, event.type contains the event name (e.g., "resize") and event.target indicates the deepest (innermost) element where the event occurred.
+
When the browser triggers an event or other JavaScript calls jQuery's .trigger() method, jQuery passes the handler an event object it can use to analyze and change the status of the event. This object is a normalized subset of data provided by the browser; the browser's unmodified native event object is available in event.originalEvent. For example, event.type contains the event name (e.g., "resize") and event.target indicates the deepest (innermost) element where the event occurred.
By default, most events bubble up from the original event target to the document element. At each element along the way, jQuery calls any matching event handlers that have been attached. A handler can prevent the event from bubbling further up the document tree (and thus prevent handlers on those elements from running) by calling event.stopPropagation(). Any other handlers attached on the current element will run however. To prevent that, call event.stopImmediatePropagation(). (Event handlers bound to an element are called in the same order that they were bound.)
Similarly, a handler can call event.preventDefault() to cancel any default action that the browser may have for this event; for example, the default action on a click event is to follow the link. Not all browser events have default actions, and not all default actions can be canceled. See the W3C Events Specification for details.
Returning false from an event handler will automatically call event.stopPropagation() and event.preventDefault(). A false value can also be passed for the handler as a shorthand for function(){ return false; }. So, $( "a.disabled" ).on( "click", false ); attaches an event handler to all links with class "disabled" that prevents them from being followed when they are clicked and also stops the event from bubbling.
From 08bdef496ff292a6daec6f58c9b51c646e950968 Mon Sep 17 00:00:00 2001
From: Richard Gibson
Date: Sun, 16 Mar 2014 14:42:43 -0400
Subject: [PATCH 032/699] .width() and .height(): synhronize documentation
* Include the style/script warning
* Follow the style guide for comments
* Ref jQuery #14545
* Closes #403
---
entries/height.xml | 7 +++++--
entries/width.xml | 3 +++
2 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/entries/height.xml b/entries/height.xml
index dd809c0f..4d315e46 100644
--- a/entries/height.xml
+++ b/entries/height.xml
@@ -14,8 +14,11 @@
This method is also able to find the height of the window and document.
-$( window ).height(); // returns height of browser viewport
-$( document ).height(); // returns height of HTML document
+// Returns height of browser viewport
+$( window ).height();
+
+// Returns height of HTML document
+$( document ).height();
Note that .height() will always return the content height, regardless of the value of the CSS box-sizing property. As of jQuery 1.8, this may require retrieving the CSS height plus box-sizing property and then subtracting any potential border and padding on each element when the element has box-sizing: border-box. To avoid this penalty, use .css( "height" ) rather than .height().
Note that .width() will always return the content width, regardless of the value of the CSS box-sizing property. As of jQuery 1.8, this may require retrieving the CSS width plus box-sizing property and then subtracting any potential border and padding on each element when the element has box-sizing: border-box. To avoid this penalty, use .css( "width" ) rather than .width().
+
+
Note: Although style and script tags will report a value for .width() or height() when absolutely positioned and given display:block, it is strongly discouraged to call those methods on these tags. In addition to being a bad practice, the results may also prove unreliable.
+
From a05af326c486e575ca90a6d43773e858ca03654c Mon Sep 17 00:00:00 2001
From: Aurelio De Rosa
Date: Sun, 16 Mar 2014 14:49:55 -0400
Subject: [PATCH 033/699] .filter: Update signature. An array of elements works
as well. Closes #396
---
entries/filter.xml | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/entries/filter.xml b/entries/filter.xml
index 9d8f53cc..9aa08474 100644
--- a/entries/filter.xml
+++ b/entries/filter.xml
@@ -15,8 +15,8 @@
1.4
-
- An element to match the current set of elements against.
+
+ One or more DOM elements to match the current set of elements against.
From 7c6cd12222932d7ebfb5240c1743a61041065343 Mon Sep 17 00:00:00 2001
From: Aurelio De Rosa
Date: Sun, 16 Mar 2014 14:51:52 -0400
Subject: [PATCH 034/699] .removeData(): Fix a small typo. Closes #400
---
entries/removeData.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/entries/removeData.xml b/entries/removeData.xml
index 7286016d..2c346cba 100644
--- a/entries/removeData.xml
+++ b/entries/removeData.xml
@@ -17,7 +17,7 @@
Remove a previously-stored piece of data.
-
The .removeData() method allows us to remove values that were previously set using .data(). When called with the name of a key, .removeData() deletes that particular value; when called with no arguments, all values are removed. Removing data from jQuery's internal .data() cache does not effect any HTML5 data- attributes in a document; use .removeAttr() to remove those.
+
The .removeData() method allows us to remove values that were previously set using .data(). When called with the name of a key, .removeData() deletes that particular value; when called with no arguments, all values are removed. Removing data from jQuery's internal .data() cache does not affect any HTML5 data- attributes in a document; use .removeAttr() to remove those.
When using .removeData("name"), jQuery will attempt to locate a data- attribute on the element if no property by that name is in the internal data cache. To avoid a re-query of the data- attribute, set the name to a value of either null or undefined (e.g. .data("name", undefined)) rather than using .removeData().
As of jQuery 1.7, when called with an array of keys or a string of space-separated keys, .removeData() deletes the value of each key in that array or string.
As of jQuery 1.4.3, calling .removeData() will cause the value of the property being removed to revert to the value of the data attribute of the same name in the DOM, rather than being set to undefined.
From d0ce77df70bfcdd2784f0f459b9fabd02f88b761 Mon Sep 17 00:00:00 2001
From: Aurelio De Rosa
Date: Sun, 16 Mar 2014 14:56:15 -0400
Subject: [PATCH 035/699] .nextUntil(): Make explicit that element can be a
jQuery object.
Closes #404
---
entries/nextUntil.xml | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/entries/nextUntil.xml b/entries/nextUntil.xml
index 3f0f3f0c..619b95a2 100644
--- a/entries/nextUntil.xml
+++ b/entries/nextUntil.xml
@@ -12,8 +12,10 @@
1.6
-
+ A DOM node or jQuery object indicating where to stop matching following sibling elements.
+
+ A string containing a selector expression to match elements against.
From 5b6edccaaafb8526fb86575977316f81f6d3431d Mon Sep 17 00:00:00 2001
From: Karl Swedberg
Date: Sun, 16 Mar 2014 15:10:41 -0400
Subject: [PATCH 036/699] .prevUntil(), .parentsUntil(): Make explicit that
Element can be a jQuery object.
---
entries/parentsUntil.xml | 4 +++-
entries/prevUntil.xml | 4 +++-
2 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/entries/parentsUntil.xml b/entries/parentsUntil.xml
index b2aa8eb7..93e5e1fa 100644
--- a/entries/parentsUntil.xml
+++ b/entries/parentsUntil.xml
@@ -12,7 +12,9 @@
1.6
-
+
+
+ A DOM node or jQuery object indicating where to stop matching ancestor elements.
diff --git a/entries/prevUntil.xml b/entries/prevUntil.xml
index 14c468ca..5e6effb0 100644
--- a/entries/prevUntil.xml
+++ b/entries/prevUntil.xml
@@ -12,7 +12,9 @@
1.6
-
+
+
+ A DOM node or jQuery object indicating where to stop matching preceding sibling elements.
From 0b9391316b0511206aeea1b49879111ffd674027 Mon Sep 17 00:00:00 2001
From: Aurelio De Rosa
Date: Sun, 16 Mar 2014 15:14:36 -0400
Subject: [PATCH 037/699] .triggerHandler(): Use "triggered" (not "created").
Closes #428
---
entries/triggerHandler.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/entries/triggerHandler.xml b/entries/triggerHandler.xml
index a470e31f..df6fb8af 100644
--- a/entries/triggerHandler.xml
+++ b/entries/triggerHandler.xml
@@ -16,7 +16,7 @@
The .triggerHandler() method does not cause the default behavior of an event to occur (such as a form submission).
While .trigger() will operate on all elements matched by the jQuery object, .triggerHandler() only affects the first matched element.
-
Events created with .triggerHandler() do not bubble up the DOM hierarchy; if they are not handled by the target element directly, they do nothing.
+
Events triggered with .triggerHandler() do not bubble up the DOM hierarchy; if they are not handled by the target element directly, they do nothing.
Instead of returning the jQuery object (to allow chaining), .triggerHandler() returns whatever value was returned by the last handler it caused to be executed. If no handlers are triggered, it returns undefined
For more information on this method, see the discussion for .trigger().
From b83bd13f827f1e1a65f2a32930be71ebeca639cc Mon Sep 17 00:00:00 2001
From: Bill Edgington
Date: Sun, 16 Mar 2014 15:18:12 -0400
Subject: [PATCH 038/699] .clone(): Specify which form controls maintain state
when cloned.
Fixes #381. Closes #382
---
entries/clone.xml | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/entries/clone.xml b/entries/clone.xml
index 8dcd4fb2..91d7bc29 100644
--- a/entries/clone.xml
+++ b/entries/clone.xml
@@ -18,7 +18,10 @@
Create a deep copy of the set of matched elements.
-
The .clone() method performs a deep copy of the set of matched elements, meaning that it copies the matched elements as well as all of their descendant elements and text nodes. For performance reasons, the dynamic state of form elements (e.g., user data typed into input, and textarea or user selections made to a select) is not copied to the cloned elements. The clone operation sets these fields to their default values as specified in the HTML.
+
The .clone() method performs a deep copy of the set of matched elements, meaning that it copies the matched elements as well as all of their descendant elements and text nodes.
+
+
Note: For performance reasons, the dynamic state of certain form elements (e.g., user data typed into textarea and user selections made to a select) is not copied to the cloned elements. When cloning input elements, the dynamic state of the element (e.g., user data typed into text inputs and user selections made to a checkbox) is retained in the cloned elements.
+
When used in conjunction with one of the insertion methods, .clone() is a convenient way to duplicate elements on a page. Consider the following HTML:
<div class="container">
From bcb87bf842e734ab631c46bf30ab322ab8ff4348 Mon Sep 17 00:00:00 2001
From: Richard Gibson
Date: Sun, 16 Mar 2014 15:23:17 -0400
Subject: [PATCH 039/699] .val(): Be more clear about when null is returned
Ref jQuery #14654
Closes #406
---
entries/val.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/entries/val.xml b/entries/val.xml
index 3d1b96bf..9285a546 100644
--- a/entries/val.xml
+++ b/entries/val.xml
@@ -11,7 +11,7 @@
Get the current value of the first element in the set of matched elements.
-
The .val() method is primarily used to get the values of form elements such as input, select and textarea. In the case of <select multiple="multiple"> elements, the .val() method returns an array containing each selected option; if no option is selected, it returns null.
+
The .val() method is primarily used to get the values of form elements such as input, select and textarea. In the case of select elements, it returns null when no option is selected and an array containing the value of each selected option when there is at least one and it is possible to select more because the multiple attribute is present.
For selects and checkboxes, you can also use the :selected and :checked selectors to get at values, for example:
// Get the value from a dropdown select
From 58be0ddb785f435d9310143ad70e25b9d0cc0c57 Mon Sep 17 00:00:00 2001
From: John Reilly
Date: Tue, 18 Mar 2014 13:52:32 -0400
Subject: [PATCH 040/699] .text(): Include Number and Boolean types for
argument. Closes #460
---
entries/text.xml | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/entries/text.xml b/entries/text.xml
index af7880ea..8ba40495 100644
--- a/entries/text.xml
+++ b/entries/text.xml
@@ -52,8 +52,11 @@ $( "p:last" ).html( str );
1.0
-
- A string of text to set as the content of each matched element.
+
+
+
+
+ The text to set as the content of each matched element. When Number or Boolean is supplied, it will be converted to a String representation.
From fb3f5f8ceb98f73c6a35326c71fb33af429d5533 Mon Sep 17 00:00:00 2001
From: Karl Swedberg
Date: Tue, 18 Mar 2014 15:39:25 -0400
Subject: [PATCH 041/699] 1.11.5
---
package.json | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/package.json b/package.json
index 907a22e2..b2200764 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.11.4",
+ "version": "1.11.5",
"homepage": "https://github.com/jquery/api.jquery.com",
"author": {
"name": "jQuery Foundation (https://jquery.org/)"
From cd7773862216f4a0be105688fe95058d6ef611ed Mon Sep 17 00:00:00 2001
From: Aurelio De Rosa
Date: Sun, 23 Mar 2014 12:26:14 +0100
Subject: [PATCH 042/699] Update jQuery.xml
Fixed a small typo
---
entries/jQuery.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/entries/jQuery.xml b/entries/jQuery.xml
index 014a5fcf..089834f1 100644
--- a/entries/jQuery.xml
+++ b/entries/jQuery.xml
@@ -248,7 +248,7 @@ $( "", {
Binds a function to be executed when the DOM has finished loading.
-
This function behaves just like $( document ).ready(), in that it should be used to wrap other $() operations on your page that depend on the DOM being ready. While this function is, technically, chainable, there really isn"t much use for chaining against it.
+
This function behaves just like $( document ).ready(), in that it should be used to wrap other $() operations on your page that depend on the DOM being ready. While this function is, technically, chainable, there really isn't much use for chaining against it.
Execute the function when the DOM is ready to be used.
From 3043a60aaab2755dc1d7b05ba506b7200bc3f1c1 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Scott=20Gonz=C3=A1lez?=
Date: Mon, 14 Apr 2014 11:31:45 -0400
Subject: [PATCH 043/699] Build: Normalize line endings
---
.gitattributes | 5 +++++
1 file changed, 5 insertions(+)
create mode 100644 .gitattributes
diff --git a/.gitattributes b/.gitattributes
new file mode 100644
index 00000000..b7ca95b5
--- /dev/null
+++ b/.gitattributes
@@ -0,0 +1,5 @@
+# Auto detect text files and perform LF normalization
+* text=auto
+
+# JS files must always use LF for tools to work
+*.js eol=lf
From 59bcdbd045db6d5fa7c73970e155403b6ffb10df Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Scott=20Gonz=C3=A1lez?=
Date: Wed, 16 Apr 2014 09:26:11 -0400
Subject: [PATCH 044/699] load: Don't rely on site content for demo
Fixes gh-475
---
entries/load.xml | 8 ++++----
resources/load.html | 20 ++++++++++++++++++++
2 files changed, 24 insertions(+), 4 deletions(-)
create mode 100644 resources/load.html
diff --git a/entries/load.xml b/entries/load.xml
index 7389800c..f5aea57c 100644
--- a/entries/load.xml
+++ b/entries/load.xml
@@ -56,9 +56,9 @@ $( "#b" ).load( "article.html #target" );
- Load the main page's footer navigation into an ordered list.
+ Load another page's list items into an ordered list.
Footer navigation:
-
+Projects:
+
]]>
diff --git a/resources/load.html b/resources/load.html
new file mode 100644
index 00000000..659f6044
--- /dev/null
+++ b/resources/load.html
@@ -0,0 +1,20 @@
+
+
+
+
+ Sample Page
+
+
+
+
Popular jQuery Projects
+
+
+
jQuery
+
jQuery UI
+
jQuery Mobile
+
QUnit
+
Sizzle
+
+
+
+
\ No newline at end of file
From 102e6130831fde253914a519c9d63894a76f3241 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Scott=20Gonz=C3=A1lez?=
Date: Wed, 16 Apr 2014 09:29:39 -0400
Subject: [PATCH 045/699] 1.11.6
---
package.json | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/package.json b/package.json
index b2200764..b603cf5d 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.11.5",
+ "version": "1.11.6",
"homepage": "https://github.com/jquery/api.jquery.com",
"author": {
"name": "jQuery Foundation (https://jquery.org/)"
From 18706517dc86f07368f5971f252768ad449def33 Mon Sep 17 00:00:00 2001
From: Manuel Strehl
Date: Thu, 24 Apr 2014 14:08:53 -0400
Subject: [PATCH 046/699] .get(): Fix description for negative indexes. Closes
#481
---
entries/get.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/entries/get.xml b/entries/get.xml
index 5698760d..64272cf4 100644
--- a/entries/get.xml
+++ b/entries/get.xml
@@ -11,7 +11,7 @@
Retrieve one of the elements matched by the jQuery object.
-
The .get() method grants access to the DOM nodes underlying each jQuery object. If the value of index is out of bounds — less than 0 or equal to or greater than the number of elements — it returns undefined. Consider a simple unordered list:
+
The .get() method grants access to the DOM nodes underlying each jQuery object. If the value of index is out of bounds — less than the negative number of elements or equal to or greater than the number of elements — it returns undefined. Consider a simple unordered list:
The $.ajax() function relies on the server to provide information about the retrieved data. If the server reports the return data as XML, the result can be traversed using normal XML methods or jQuery's selectors. If another type is detected, such as HTML in the example above, the data is treated as text.
-
Different data handling can be achieved by using the dataType option. Besides plain xml, the dataType can be html, json, jsonp, script, or text.
-
The text and xml types return the data with no processing. The data is simply passed on to the success handler, either through the responseText or responseXML property of the jqXHR object, respectively.
-
Note: We must ensure that the MIME type reported by the web server matches our choice of dataType. In particular, XML must be declared by the server as text/xml or application/xml for consistent results.
-
If html is specified, any embedded JavaScript inside the retrieved data is executed before the HTML is returned as a string. Similarly, script will execute the JavaScript that is pulled back from the server, then return nothing.
-
The json type parses the fetched data file as a JavaScript object and returns the constructed object as the result data. To do so, it uses jQuery.parseJSON() when the browser supports it; otherwise it uses a Functionconstructor. Malformed JSON data will throw a parse error (see json.org for more information). JSON data is convenient for communicating structured data in a way that is concise and easy for JavaScript to parse. If the fetched data file exists on a remote server, specify the jsonp type instead.
-
The jsonp type appends a query string parameter of callback=? to the URL. The server should prepend the JSON data with the callback name to form a valid JSONP response. We can specify a parameter name other than callback with the jsonp option to $.ajax().
-
Note: JSONP is an extension of the JSON format, requiring some server-side code to detect and handle the query string parameter. More information about it can be found in the original post detailing its use.
-
When data is retrieved from remote servers (which is only possible using the script or jsonp data types), the error callbacks and global events will never be fired.
+
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 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.
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.
From a92dd1ba0b0ff1f080b769f015311a4084f697f4 Mon Sep 17 00:00:00 2001
From: Karl Swedberg
Date: Wed, 30 Apr 2014 14:55:06 -0400
Subject: [PATCH 048/699] 1.11.7
---
package.json | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/package.json b/package.json
index b603cf5d..d1719340 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.11.6",
+ "version": "1.11.7",
"homepage": "https://github.com/jquery/api.jquery.com",
"author": {
"name": "jQuery Foundation (https://jquery.org/)"
From c137cb36bf96146a6045ffc7a789a2c70a82763a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Scott=20Gonz=C3=A1lez?=
Date: Mon, 5 May 2014 14:07:33 -0400
Subject: [PATCH 049/699] jQuery.getScript: raw.github.com ->
raw.githubusercontent.com
---
entries/jQuery.getScript.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/entries/jQuery.getScript.xml b/entries/jQuery.getScript.xml
index bc86be4b..d519358f 100644
--- a/entries/jQuery.getScript.xml
+++ b/entries/jQuery.getScript.xml
@@ -91,7 +91,7 @@ $.cachedScript( "ajax/test.js" ).done(function( script, textStatus ) {
Load the official jQuery Color Animation plugin dynamically and bind some color animations to occur once the new functionality is loaded.
Date: Mon, 12 May 2014 12:02:56 -0400
Subject: [PATCH 050/699] jQuery.parseJSON: Fix stray line break in example
---
entries/jQuery.parseJSON.xml | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/entries/jQuery.parseJSON.xml b/entries/jQuery.parseJSON.xml
index b6f2ac08..1f13da91 100644
--- a/entries/jQuery.parseJSON.xml
+++ b/entries/jQuery.parseJSON.xml
@@ -22,8 +22,8 @@
Parse a JSON string.
+alert( obj.name === "John" );
+]]>
From 1b7e2e704b97c5e1415679a8ec4edb2736c228e2 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Scott=20Gonz=C3=A1lez?=
Date: Mon, 12 May 2014 12:03:06 -0400
Subject: [PATCH 051/699] 1.11.8
---
package.json | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/package.json b/package.json
index d1719340..0079431e 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.11.7",
+ "version": "1.11.8",
"homepage": "https://github.com/jquery/api.jquery.com",
"author": {
"name": "jQuery Foundation (https://jquery.org/)"
From e708998f137f531418e18c46117ca62289666b2b Mon Sep 17 00:00:00 2001
From: Usman Akeju
Date: Wed, 14 May 2014 09:54:06 -0400
Subject: [PATCH 052/699] jQuery.boxModel: removed since 1.8 Closes gh451
---
entries/jQuery.boxModel.xml | 33 +++------------------------------
1 file changed, 3 insertions(+), 30 deletions(-)
diff --git a/entries/jQuery.boxModel.xml b/entries/jQuery.boxModel.xml
index 18411216..f260538a 100644
--- a/entries/jQuery.boxModel.xml
+++ b/entries/jQuery.boxModel.xml
@@ -1,40 +1,13 @@
-
+jQuery.boxModel1.0
- Deprecated in jQuery 1.3 (see jQuery.support). States if the current page, in the user's browser, is being rendered using the W3C CSS Box Model.
+ 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.
-
- Returns the box model for the iframe.
- " +
- jQuery.boxModel + "" );
-]]>
-
-
-]]>
-
-
- Returns false if the page is in Quirks Mode in Internet Explorer
-
-
-
+
From 1c2c0f68582bffdafa60cb2ea7ab6680bc986f82 Mon Sep 17 00:00:00 2001
From: Karl Swedberg
Date: Wed, 14 May 2014 09:57:12 -0400
Subject: [PATCH 053/699] 1.11.9
---
package.json | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/package.json b/package.json
index 0079431e..47d187f9 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.11.8",
+ "version": "1.11.9",
"homepage": "https://github.com/jquery/api.jquery.com",
"author": {
"name": "jQuery Foundation (https://jquery.org/)"
From 9206d3f53f663d2a973712cdb103169071ed16f2 Mon Sep 17 00:00:00 2001
From: Usman Akeju
Date: Wed, 14 May 2014 16:34:04 +0200
Subject: [PATCH 054/699] jQuery.type: Argument can be anything
Closes gh-494
---
entries/jQuery.type.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/entries/jQuery.type.xml b/entries/jQuery.type.xml
index 690bee10..f77b3139 100644
--- a/entries/jQuery.type.xml
+++ b/entries/jQuery.type.xml
@@ -3,7 +3,7 @@
jQuery.type()1.4.3
-
+ Object to get the internal JavaScript [[Class]] of.
From a93a1cc7203d16b6ee01de07c88bb83c9486b54d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Scott=20Gonz=C3=A1lez?=
Date: Thu, 15 May 2014 19:03:55 -0400
Subject: [PATCH 055/699] Build: Use vagrant for sample config
---
config-sample.json | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/config-sample.json b/config-sample.json
index 85f8556b..b26cf9fc 100644
--- a/config-sample.json
+++ b/config-sample.json
@@ -1,5 +1,5 @@
{
- "url": "local.api.jquery.com",
+ "url": "vagrant.api.jquery.com",
"username": "admin",
"password": "secret"
}
From 11c93b9d0639be79bd72020652af92e6c226603e Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Olav=20Junker=20Kj=C3=A6r?=
Date: Sat, 18 Jan 2014 12:44:11 +0100
Subject: [PATCH 056/699] All: Added structured types for higer order function
parameters
Some function parameters of function type (e.g. handlers, callbacks) was
described with the signature in the name-attribute, eg. . This have been modified
to used nested -elements to describe the signatures more
consistently.
Changed some argument type from XMLHttpRequest to jsXHR
Some callback functions was indicated to receive XMLHttpRequest rather
than jsXHR.
Fixed spelling and changed 'ajaxOptions' to 'PlainObject'
The ajaxOptions/ajaxSettings options object is not documented as a
seperate type, so now changed to PlainObject. Changed misspelling of
jsXHR to jqXHR.
Changed nargument names to valid identifers to avoid confusion
Argument names with whitespace like "jQuery object" are confusing,
because it might easily be mistaken for two arguments when reading the
signature. Argument names like "-index" are also confusing since they
look like an expression rather than a name. I have renamed the argument
names to be valid javascript identifiers, just like actual argument
names have to be. Also changed argument type "Object" and "PlainObject"
to "JQuery" where the prose documentation indicates that the type is a
jQuery object.
Changed argument name 'jQueryObject' to 'selection'
As per discussion on #jquery-content. Also changed type from 'Object'
to 'jQuery' where prose indicates a jQuery object.
Closes gh-419
---
entries/add.xml | 2 +-
entries/addClass.xml | 5 ++++-
entries/after.xml | 9 ++++++++-
entries/ajaxComplete.xml | 5 ++++-
entries/ajaxError.xml | 6 +++++-
entries/ajaxSend.xml | 5 ++++-
entries/ajaxStart.xml | 2 +-
entries/ajaxStop.xml | 2 +-
entries/ajaxSuccess.xml | 6 +++++-
entries/append.xml | 9 ++++++++-
entries/attr.xml | 8 +++++++-
entries/before.xml | 7 +++++++
entries/bind.xml | 3 ++-
entries/blur.xml | 6 ++++--
entries/change.xml | 6 ++++--
entries/click.xml | 6 ++++--
entries/closest.xml | 2 +-
entries/css.xml | 8 +++++++-
entries/dblclick.xml | 6 ++++--
entries/delegate.xml | 6 ++++--
entries/each.xml | 4 +++-
entries/eq-selector.xml | 2 +-
entries/eq.xml | 2 +-
entries/error.xml | 6 ++++--
entries/filter.xml | 7 +++++--
entries/find.xml | 2 +-
entries/focus.xml | 6 ++++--
entries/focusin.xml | 6 ++++--
entries/focusout.xml | 6 ++++--
entries/gt-selector.xml | 2 +-
entries/height.xml | 8 +++++++-
entries/hover.xml | 15 +++++++++------
entries/html.xml | 5 ++++-
entries/is.xml | 9 ++++++---
entries/jQuery.ajaxPrefilter.xml | 5 ++++-
entries/jQuery.ajaxTransport.xml | 5 ++++-
entries/jQuery.each.xml | 19 ++++++++++++++++---
entries/jQuery.get.xml | 5 ++++-
entries/jQuery.getJSON.xml | 5 ++++-
entries/jQuery.getScript.xml | 5 ++++-
entries/jQuery.grep.xml | 5 ++++-
entries/jQuery.map.xml | 20 ++++++++++++--------
entries/jQuery.post.xml | 5 ++++-
entries/jQuery.queue.xml | 2 +-
entries/jQuery.xml | 2 +-
entries/keydown.xml | 6 ++++--
entries/keypress.xml | 6 ++++--
entries/keyup.xml | 6 ++++--
entries/live.xml | 6 ++++--
entries/load-event.xml | 6 ++++--
entries/load.xml | 5 ++++-
entries/lt-selector.xml | 2 +-
entries/map.xml | 5 ++++-
entries/mousedown.xml | 6 ++++--
entries/mouseenter.xml | 6 ++++--
entries/mouseleave.xml | 6 ++++--
entries/mousemove.xml | 6 ++++--
entries/mouseout.xml | 6 ++++--
entries/mouseover.xml | 6 ++++--
entries/mouseup.xml | 6 ++++--
entries/not.xml | 7 +++++--
entries/off.xml | 3 ++-
entries/offset.xml | 5 ++++-
entries/on.xml | 3 ++-
entries/one.xml | 6 ++++--
entries/prepend.xml | 9 ++++++++-
entries/prop.xml | 14 +++++++++++++-
entries/queue.xml | 3 ++-
entries/removeClass.xml | 5 ++++-
entries/resize.xml | 6 ++++--
entries/scroll.xml | 6 ++++--
entries/select.xml | 6 ++++--
entries/submit.xml | 6 ++++--
entries/text.xml | 5 ++++-
entries/toggle-event.xml | 9 ++++++---
entries/toggleClass.xml | 6 +++++-
entries/unbind.xml | 3 ++-
entries/undelegate.xml | 3 ++-
entries/unload.xml | 6 ++++--
entries/val.xml | 5 ++++-
entries/width.xml | 8 +++++++-
entries/wrap.xml | 7 ++++++-
entries/wrapInner.xml | 4 +++-
83 files changed, 357 insertions(+), 129 deletions(-)
diff --git a/entries/add.xml b/entries/add.xml
index e93025df..1bd30426 100644
--- a/entries/add.xml
+++ b/entries/add.xml
@@ -21,7 +21,7 @@
1.3.2
-
+ An existing jQuery object to add to the set of matched elements.
diff --git a/entries/addClass.xml b/entries/addClass.xml
index 7d299dba..238d03e5 100644
--- a/entries/addClass.xml
+++ b/entries/addClass.xml
@@ -9,8 +9,11 @@
1.4
-
+ A function returning one or more space-separated class names to be added to the existing class name(s). Receives the index position of the element in the set and the existing class name(s) as arguments. Within the function, this refers to the current element in the set.
+
+
+ Adds the specified class(es) to each of the set of matched elements.
diff --git a/entries/after.xml b/entries/after.xml
index 2c8869c9..8e57cdac 100644
--- a/entries/after.xml
+++ b/entries/after.xml
@@ -20,8 +20,15 @@
1.4
-
+ A function that returns an HTML string, DOM element(s), or jQuery object to insert after each element in the set of matched elements. Receives the index position of the element in the set as an argument. Within the function, this refers to the current element in the set.
+
+
+
+
+
+
+ Insert content, specified by the parameter, after each element in the set of matched elements.
diff --git a/entries/ajaxComplete.xml b/entries/ajaxComplete.xml
index 3b3fc93e..3ff3b58c 100644
--- a/entries/ajaxComplete.xml
+++ b/entries/ajaxComplete.xml
@@ -3,7 +3,10 @@
.ajaxComplete()1.0
-
+
+
+
+ The function to be invoked.
diff --git a/entries/ajaxError.xml b/entries/ajaxError.xml
index 4029c7be..fbee691d 100644
--- a/entries/ajaxError.xml
+++ b/entries/ajaxError.xml
@@ -3,8 +3,12 @@
.ajaxError()1.0
-
+ The function to be invoked.
+
+
+
+ Register a handler to be called when Ajax requests complete with an error. This is an Ajax Event.
diff --git a/entries/ajaxSend.xml b/entries/ajaxSend.xml
index dd2dc44b..2d609b71 100644
--- a/entries/ajaxSend.xml
+++ b/entries/ajaxSend.xml
@@ -3,8 +3,11 @@
.ajaxSend()1.0
-
+ The function to be invoked.
+
+
+ Attach a function to be executed before an Ajax request is sent. This is an Ajax Event.
diff --git a/entries/ajaxStart.xml b/entries/ajaxStart.xml
index 854ad019..7747e5b6 100644
--- a/entries/ajaxStart.xml
+++ b/entries/ajaxStart.xml
@@ -3,7 +3,7 @@
.ajaxStart()1.0
-
+ The function to be invoked.
diff --git a/entries/ajaxStop.xml b/entries/ajaxStop.xml
index 63e14639..76b3bffc 100644
--- a/entries/ajaxStop.xml
+++ b/entries/ajaxStop.xml
@@ -4,7 +4,7 @@
Register a handler to be called when all Ajax requests have completed. This is an Ajax Event.1.0
-
+ The function to be invoked.
diff --git a/entries/ajaxSuccess.xml b/entries/ajaxSuccess.xml
index 968350d8..26583e2e 100644
--- a/entries/ajaxSuccess.xml
+++ b/entries/ajaxSuccess.xml
@@ -3,8 +3,12 @@
.ajaxSuccess()1.0
-
+ The function to be invoked.
+
+
+
+ Attach a function to be executed whenever an Ajax request completes successfully. This is an Ajax Event.
diff --git a/entries/append.xml b/entries/append.xml
index 5903fa05..c1de1420 100644
--- a/entries/append.xml
+++ b/entries/append.xml
@@ -20,8 +20,15 @@
1.4
-
+ A function that returns an HTML string, DOM element(s), or jQuery object to insert at the end of each element in the set of matched elements. Receives the index position of the element in the set and the old HTML value of the element as arguments. Within the function, this refers to the current element in the set.
+
+
+
+
+
+
+ Insert content, specified by the parameter, to the end of each element in the set of matched elements.
diff --git a/entries/attr.xml b/entries/attr.xml
index 5e9dd89c..3e181e67 100644
--- a/entries/attr.xml
+++ b/entries/attr.xml
@@ -164,8 +164,14 @@ The title of the emphasis is:
The name of the attribute to set.
-
+ A function returning the value to set. this is the current element. Receives the index position of the element in the set and the old attribute value as arguments.
+
+
+
+
+
+ Set one or more attributes for the set of matched elements.
diff --git a/entries/before.xml b/entries/before.xml
index 4aeae8d6..7c2ebb7b 100644
--- a/entries/before.xml
+++ b/entries/before.xml
@@ -21,6 +21,13 @@
1.4
+
+
+
+
+
+
+ A function that returns an HTML string, DOM element(s), or jQuery object to insert before each element in the set of matched elements. Receives the index position of the element in the set as an argument. Within the function, this refers to the current element in the set.
diff --git a/entries/bind.xml b/entries/bind.xml
index 3b00923b..be20d77c 100644
--- a/entries/bind.xml
+++ b/entries/bind.xml
@@ -9,8 +9,9 @@
An object containing data that will be passed to the event handler.
-
+ A function to execute each time the event is triggered.
+
diff --git a/entries/blur.xml b/entries/blur.xml
index 3029a6fc..ddb9bf99 100644
--- a/entries/blur.xml
+++ b/entries/blur.xml
@@ -4,8 +4,9 @@
Bind an event handler to the "blur" JavaScript event, or trigger that event on an element.1.0
-
+ A function to execute each time the event is triggered.
+
@@ -13,8 +14,9 @@
An object containing data that will be passed to the event handler.
-
+ A function to execute each time the event is triggered.
+
diff --git a/entries/change.xml b/entries/change.xml
index d5f4f4f1..eedea432 100644
--- a/entries/change.xml
+++ b/entries/change.xml
@@ -4,8 +4,9 @@
Bind an event handler to the "change" JavaScript event, or trigger that event on an element.1.0
-
+ A function to execute each time the event is triggered.
+
@@ -13,8 +14,9 @@
An object containing data that will be passed to the event handler.
-
+ A function to execute each time the event is triggered.
+
diff --git a/entries/click.xml b/entries/click.xml
index 4715cac3..c6a014c1 100644
--- a/entries/click.xml
+++ b/entries/click.xml
@@ -4,8 +4,9 @@
Bind an event handler to the "click" JavaScript event, or trigger that event on an element.1.0
-
+ A function to execute each time the event is triggered.
+
@@ -13,8 +14,9 @@
An object containing data that will be passed to the event handler.
-
+ A function to execute each time the event is triggered.
+
diff --git a/entries/closest.xml b/entries/closest.xml
index 9a01fb1e..5f1bb2b4 100644
--- a/entries/closest.xml
+++ b/entries/closest.xml
@@ -19,7 +19,7 @@
1.6
-
+ A jQuery object to match elements against.
diff --git a/entries/css.xml b/entries/css.xml
index 6a5391cc..178fc326 100644
--- a/entries/css.xml
+++ b/entries/css.xml
@@ -123,8 +123,14 @@ $( "div" ).click(function() {
A CSS property name.
-
+ A function returning the value to set. this is the current element. Receives the index position of the element in the set and the old value as arguments.
+
+
+
+
+
+
diff --git a/entries/dblclick.xml b/entries/dblclick.xml
index c08c2915..ec851198 100644
--- a/entries/dblclick.xml
+++ b/entries/dblclick.xml
@@ -4,8 +4,9 @@
Bind an event handler to the "dblclick" JavaScript event, or trigger that event on an element.1.0
-
+ A function to execute each time the event is triggered.
+
@@ -13,8 +14,9 @@
An object containing data that will be passed to the event handler.
-
+ A function to execute each time the event is triggered.
+
diff --git a/entries/delegate.xml b/entries/delegate.xml
index 09d6d7b5..dd57ffee 100644
--- a/entries/delegate.xml
+++ b/entries/delegate.xml
@@ -10,8 +10,9 @@
A string containing one or more space-separated JavaScript event types, such as "click" or "keydown," or custom event names.
-
+ A function to execute at the time the event is triggered.
+
@@ -25,8 +26,9 @@
An object containing data that will be passed to the event handler.
-
+ A function to execute at the time the event is triggered.
+
diff --git a/entries/each.xml b/entries/each.xml
index ea75814e..9a882fb2 100644
--- a/entries/each.xml
+++ b/entries/each.xml
@@ -3,8 +3,10 @@
.each()1.0
-
+ A function to execute for each matched element.
+
+ Iterate over a jQuery object, executing a function for each matched element.
diff --git a/entries/eq-selector.xml b/entries/eq-selector.xml
index aad654c0..1e48407b 100644
--- a/entries/eq-selector.xml
+++ b/entries/eq-selector.xml
@@ -11,7 +11,7 @@
:eq(-index)1.8
-
+ Zero-based index of the element to match, counting backwards from the last element.
diff --git a/entries/eq.xml b/entries/eq.xml
index af0b7a72..ddb06c74 100644
--- a/entries/eq.xml
+++ b/entries/eq.xml
@@ -9,7 +9,7 @@
1.4
-
+ An integer indicating the position of the element, counting backwards from the last element in the set.
diff --git a/entries/error.xml b/entries/error.xml
index e5c0c07d..f93ba9fd 100644
--- a/entries/error.xml
+++ b/entries/error.xml
@@ -4,8 +4,9 @@
Bind an event handler to the "error" JavaScript event.1.0
-
+ A function to execute when the event is triggered.
+
@@ -13,8 +14,9 @@
An object containing data that will be passed to the event handler.
-
+ A function to execute each time the event is triggered.
+
diff --git a/entries/filter.xml b/entries/filter.xml
index 9aa08474..440b4277 100644
--- a/entries/filter.xml
+++ b/entries/filter.xml
@@ -9,8 +9,11 @@
1.0
-
+ A function used as a test for each element in the set. this is the current DOM element.
+
+
+
@@ -21,7 +24,7 @@
1.4
-
+ An existing jQuery object to match the current set of elements against.
diff --git a/entries/find.xml b/entries/find.xml
index 9db417af..16c1d799 100644
--- a/entries/find.xml
+++ b/entries/find.xml
@@ -9,7 +9,7 @@
1.6
-
+ A jQuery object to match elements against.
diff --git a/entries/focus.xml b/entries/focus.xml
index b8398786..0651faab 100644
--- a/entries/focus.xml
+++ b/entries/focus.xml
@@ -4,8 +4,9 @@
Bind an event handler to the "focus" JavaScript event, or trigger that event on an element.1.0
-
+ A function to execute each time the event is triggered.
+
@@ -13,8 +14,9 @@
An object containing data that will be passed to the event handler.
-
+ A function to execute each time the event is triggered.
+
diff --git a/entries/focusin.xml b/entries/focusin.xml
index e441a4e4..a692e3bb 100644
--- a/entries/focusin.xml
+++ b/entries/focusin.xml
@@ -4,8 +4,9 @@
Bind an event handler to the "focusin" event.1.4
-
+ A function to execute each time the event is triggered.
+
@@ -13,8 +14,9 @@
An object containing data that will be passed to the event handler.
-
+ A function to execute each time the event is triggered.
+
diff --git a/entries/focusout.xml b/entries/focusout.xml
index 5528f56a..2d110637 100644
--- a/entries/focusout.xml
+++ b/entries/focusout.xml
@@ -4,8 +4,9 @@
Bind an event handler to the "focusout" JavaScript event.1.4
-
+ A function to execute each time the event is triggered.
+
@@ -13,8 +14,9 @@
An object containing data that will be passed to the event handler.
-
+ A function to execute each time the event is triggered.
+
diff --git a/entries/gt-selector.xml b/entries/gt-selector.xml
index b4a44f50..303723a9 100644
--- a/entries/gt-selector.xml
+++ b/entries/gt-selector.xml
@@ -11,7 +11,7 @@
:gt(-index)1.8
-
+ Zero-based index, counting backwards from the last element.
diff --git a/entries/height.xml b/entries/height.xml
index 4d315e46..8808ac6c 100644
--- a/entries/height.xml
+++ b/entries/height.xml
@@ -87,7 +87,13 @@ $( "#getw" ).click(function() {
1.4.1
-
+
+
+
+
+
+
+ A function returning the height to set. Receives the index position of the element in the set and the old height as arguments. Within the function, this refers to the current element in the set.
diff --git a/entries/hover.xml b/entries/hover.xml
index fcfdd377..3eb38753 100644
--- a/entries/hover.xml
+++ b/entries/hover.xml
@@ -6,11 +6,13 @@
Bind two handlers to the matched elements, to be executed when the mouse pointer enters and leaves the elements.1.0
-
- A function to execute when the mouse pointer enters the element.
+
+
+ A function to execute when the mouse pointer enters the element.
-
- A function to execute when the mouse pointer leaves the element.
+
+
+ A function to execute when the mouse pointer leaves the element.
@@ -83,8 +85,9 @@ $( "td" ).off( "mouseenter mouseleave" );
Bind a single handler to the matched elements, to be executed when the mouse pointer enters or leaves the elements.1.4
-
- A function to execute when the mouse pointer enters or leaves the element.
+
+
+ A function to execute when the mouse pointer enters or leaves the element.
diff --git a/entries/html.xml b/entries/html.xml
index c4160f72..0e9f9dcc 100644
--- a/entries/html.xml
+++ b/entries/html.xml
@@ -74,7 +74,10 @@ $( "p" ).click(function() {
1.4
-
+
+
+
+ A function returning the HTML content to set. Receives the
index position of the element in the set and the old HTML value as arguments.
jQuery empties the element before calling the function;
diff --git a/entries/is.xml b/entries/is.xml
index 20ebd45d..2a14f6a3 100644
--- a/entries/is.xml
+++ b/entries/is.xml
@@ -9,13 +9,16 @@
1.6
-
- A function used as a test for the set of elements. It accepts one argument, index, which is the element's index in the jQuery collection.Within the function, this refers to the current DOM element.
+
+ A function used as a test for the set of elements. It accepts one argument, index, which is the element's index in the jQuery collection. Within the function, this refers to the current DOM element.
+
+
+ 1.6
-
+ An existing jQuery object to match the current set of elements against.
diff --git a/entries/jQuery.ajaxPrefilter.xml b/entries/jQuery.ajaxPrefilter.xml
index 405811bc..eb762dfb 100644
--- a/entries/jQuery.ajaxPrefilter.xml
+++ b/entries/jQuery.ajaxPrefilter.xml
@@ -7,8 +7,11 @@
An optional string containing one or more space-separated dataTypes
-
+ A handler to set default values for future Ajax requests.
+
+
+
diff --git a/entries/jQuery.ajaxTransport.xml b/entries/jQuery.ajaxTransport.xml
index d44730d3..ccf5151e 100644
--- a/entries/jQuery.ajaxTransport.xml
+++ b/entries/jQuery.ajaxTransport.xml
@@ -7,8 +7,11 @@
A string identifying the data type to use
-
+ A handler to return the new transport object to use with the data type provided in the first argument.
+
+
+
diff --git a/entries/jQuery.each.xml b/entries/jQuery.each.xml
index 55cd16f9..f8ab8a64 100644
--- a/entries/jQuery.each.xml
+++ b/entries/jQuery.each.xml
@@ -3,10 +3,23 @@
jQuery.each()1.0
-
- The object or array to iterate over.
+
+ The array to iterate over.
-
+
+
+
+ The function that will be executed on every object.
+
+
+
+ 1.0
+
+ The object to iterate over.
+
+
+
+ The function that will be executed on every object.
diff --git a/entries/jQuery.get.xml b/entries/jQuery.get.xml
index af75af2c..396e58b0 100644
--- a/entries/jQuery.get.xml
+++ b/entries/jQuery.get.xml
@@ -11,7 +11,10 @@
A plain object or string that is sent to the server with the request.
-
+
+
+
+ A callback function that is executed if the request succeeds.
diff --git a/entries/jQuery.getJSON.xml b/entries/jQuery.getJSON.xml
index 92adffa6..1485a2a2 100644
--- a/entries/jQuery.getJSON.xml
+++ b/entries/jQuery.getJSON.xml
@@ -9,7 +9,10 @@
A plain object or string that is sent to the server with the request.
-
+
+
+
+ A callback function that is executed if the request succeeds.
diff --git a/entries/jQuery.getScript.xml b/entries/jQuery.getScript.xml
index d519358f..488b4525 100644
--- a/entries/jQuery.getScript.xml
+++ b/entries/jQuery.getScript.xml
@@ -6,7 +6,10 @@
A string containing the URL to which the request is sent.
-
+
+
+
+ A callback function that is executed if the request succeeds.
diff --git a/entries/jQuery.grep.xml b/entries/jQuery.grep.xml
index 3aa99aae..245a672d 100644
--- a/entries/jQuery.grep.xml
+++ b/entries/jQuery.grep.xml
@@ -7,7 +7,10 @@
The array to search through.
-
+
+
+
+ The function to process each item against. The first argument to the function is the item, and the second argument is the index. The function should return a Boolean value. this will be the global window object.
diff --git a/entries/jQuery.map.xml b/entries/jQuery.map.xml
index 8bb6a279..3c499e6c 100644
--- a/entries/jQuery.map.xml
+++ b/entries/jQuery.map.xml
@@ -6,19 +6,23 @@
The Array to translate.
-
- The function to process each item against. The first argument to the function is the array item, the second argument is the index in array The function can return any value. Within the function, this refers to the global (window) object.
+
+
+
+
+ The function to process each item against. The first argument to the function is the array item, the second argument is the index in array The function can return any value. A returned array will be flattened into the resulting array. Within the function, this refers to the global (window) object.1.6
-
-
-
- The Array or Object to translate.
+
+ The Object to translate.
-
- The function to process each item against. The first argument to the function is the value; the second argument is the index or key of the array or object property. The function can return any value to add to the array. A returned array will be flattened into the resulting array. Within the function, this refers to the global (window) object.
+
+
+
+
+ The function to process each item against. The first argument to the function is the value; the second argument is the key of the object property. The function can return any value to add to the array. A returned array will be flattened into the resulting array. Within the function, this refers to the global (window) object. Translate all items in an array or object to new array of items.
diff --git a/entries/jQuery.post.xml b/entries/jQuery.post.xml
index e32e7e00..c066cbf4 100644
--- a/entries/jQuery.post.xml
+++ b/entries/jQuery.post.xml
@@ -11,7 +11,10 @@
A plain object or string that is sent to the server with the request.
-
+
+
+
+ A callback function that is executed if the request succeeds. Required if dataType is provided, but can be null in that case.
diff --git a/entries/jQuery.queue.xml b/entries/jQuery.queue.xml
index 8b620b8f..3921e020 100644
--- a/entries/jQuery.queue.xml
+++ b/entries/jQuery.queue.xml
@@ -91,7 +91,7 @@ runIt();
A string containing the name of the queue. Defaults to fx, the standard effects queue.
-
+ The new function to add to the queue.
diff --git a/entries/jQuery.xml b/entries/jQuery.xml
index 014a5fcf..ea052d35 100644
--- a/entries/jQuery.xml
+++ b/entries/jQuery.xml
@@ -34,7 +34,7 @@
1.0
-
+ An existing jQuery object to clone.
diff --git a/entries/keydown.xml b/entries/keydown.xml
index b72e0ad7..893be2a7 100644
--- a/entries/keydown.xml
+++ b/entries/keydown.xml
@@ -3,8 +3,9 @@
.keydown()1.0
-
+ A function to execute each time the event is triggered.
+
@@ -12,8 +13,9 @@
An object containing data that will be passed to the event handler.
-
+ A function to execute each time the event is triggered.
+
diff --git a/entries/keypress.xml b/entries/keypress.xml
index b6421b20..0724c1bf 100644
--- a/entries/keypress.xml
+++ b/entries/keypress.xml
@@ -4,8 +4,9 @@
Bind an event handler to the "keypress" JavaScript event, or trigger that event on an element.1.0
-
+ A function to execute each time the event is triggered.
+
@@ -13,8 +14,9 @@
An object containing data that will be passed to the event handler.
-
+ A function to execute each time the event is triggered.
+
diff --git a/entries/keyup.xml b/entries/keyup.xml
index f65c6a03..517d94b9 100644
--- a/entries/keyup.xml
+++ b/entries/keyup.xml
@@ -4,8 +4,9 @@
Bind an event handler to the "keyup" JavaScript event, or trigger that event on an element.1.0
-
+ A function to execute each time the event is triggered.
+
@@ -13,8 +14,9 @@
An object containing data that will be passed to the event handler.
-
+ A function to execute each time the event is triggered.
+
diff --git a/entries/live.xml b/entries/live.xml
index 4ed78cc8..95f9d5d8 100644
--- a/entries/live.xml
+++ b/entries/live.xml
@@ -7,8 +7,9 @@
A string containing a JavaScript event type, such as "click" or "keydown." As of jQuery 1.4 the string can contain multiple, space-separated event types or custom event names.
-
+ A function to execute at the time the event is triggered.
+
@@ -19,8 +20,9 @@
An object containing data that will be passed to the event handler.
-
+ A function to execute at the time the event is triggered.
+
diff --git a/entries/load-event.xml b/entries/load-event.xml
index 30e7662a..b8e48626 100644
--- a/entries/load-event.xml
+++ b/entries/load-event.xml
@@ -4,8 +4,9 @@
Bind an event handler to the "load" JavaScript event.1.0
-
+ A function to execute when the event is triggered.
+
@@ -13,8 +14,9 @@
An object containing data that will be passed to the event handler.
-
+ A function to execute each time the event is triggered.
+
diff --git a/entries/load.xml b/entries/load.xml
index f5aea57c..951c43f6 100644
--- a/entries/load.xml
+++ b/entries/load.xml
@@ -11,7 +11,10 @@
A plain object or string that is sent to the server with the request.
-
+
+
+
+ A callback function that is executed when the request completes.
diff --git a/entries/lt-selector.xml b/entries/lt-selector.xml
index d301f11d..b85b5f77 100644
--- a/entries/lt-selector.xml
+++ b/entries/lt-selector.xml
@@ -11,7 +11,7 @@
:lt(-index)1.8
-
+ Zero-based index, counting backwards from the last element.
diff --git a/entries/map.xml b/entries/map.xml
index 6fbe68d7..55a87d83 100644
--- a/entries/map.xml
+++ b/entries/map.xml
@@ -3,7 +3,10 @@
.map()1.2
-
+
+
+
+ A function object that will be invoked for each element in the current set.
diff --git a/entries/mousedown.xml b/entries/mousedown.xml
index 5f663575..51186203 100644
--- a/entries/mousedown.xml
+++ b/entries/mousedown.xml
@@ -4,8 +4,9 @@
Bind an event handler to the "mousedown" JavaScript event, or trigger that event on an element.1.0
-
+ A function to execute each time the event is triggered.
+
@@ -13,8 +14,9 @@
An object containing data that will be passed to the event handler.
-
+ A function to execute each time the event is triggered.
+
diff --git a/entries/mouseenter.xml b/entries/mouseenter.xml
index c90a8a03..72acea07 100644
--- a/entries/mouseenter.xml
+++ b/entries/mouseenter.xml
@@ -4,8 +4,9 @@
Bind an event handler to be fired when the mouse enters an element, or trigger that handler on an element.1.0
-
+ A function to execute each time the event is triggered.
+
@@ -13,8 +14,9 @@
An object containing data that will be passed to the event handler.
-
+ A function to execute each time the event is triggered.
+
diff --git a/entries/mouseleave.xml b/entries/mouseleave.xml
index e7fd4c49..af7f8589 100644
--- a/entries/mouseleave.xml
+++ b/entries/mouseleave.xml
@@ -4,8 +4,9 @@
Bind an event handler to be fired when the mouse leaves an element, or trigger that handler on an element.1.0
-
+ A function to execute each time the event is triggered.
+
@@ -13,8 +14,9 @@
An object containing data that will be passed to the event handler.
-
+ A function to execute each time the event is triggered.
+
diff --git a/entries/mousemove.xml b/entries/mousemove.xml
index a0e1a46a..56943fd4 100644
--- a/entries/mousemove.xml
+++ b/entries/mousemove.xml
@@ -4,8 +4,9 @@
Bind an event handler to the "mousemove" JavaScript event, or trigger that event on an element.1.0
-
+ A function to execute each time the event is triggered.
+
@@ -13,8 +14,9 @@
An object containing data that will be passed to the event handler.
-
+ A function to execute each time the event is triggered.
+
diff --git a/entries/mouseout.xml b/entries/mouseout.xml
index a84b825f..844d886f 100644
--- a/entries/mouseout.xml
+++ b/entries/mouseout.xml
@@ -4,8 +4,9 @@
Bind an event handler to the "mouseout" JavaScript event, or trigger that event on an element.1.0
-
+ A function to execute each time the event is triggered.
+
@@ -13,8 +14,9 @@
An object containing data that will be passed to the event handler.
-
+ A function to execute each time the event is triggered.
+
diff --git a/entries/mouseover.xml b/entries/mouseover.xml
index 016ad3d5..1ddfd9e5 100644
--- a/entries/mouseover.xml
+++ b/entries/mouseover.xml
@@ -4,8 +4,9 @@
Bind an event handler to the "mouseover" JavaScript event, or trigger that event on an element.1.0
-
+ A function to execute each time the event is triggered.
+
@@ -13,8 +14,9 @@
An object containing data that will be passed to the event handler.
-
+ A function to execute each time the event is triggered.
+
diff --git a/entries/mouseup.xml b/entries/mouseup.xml
index 018ea304..6006ea69 100644
--- a/entries/mouseup.xml
+++ b/entries/mouseup.xml
@@ -4,8 +4,9 @@
Bind an event handler to the "mouseup" JavaScript event, or trigger that event on an element.1.0
-
+ A function to execute each time the event is triggered.
+
@@ -13,8 +14,9 @@
An object containing data that will be passed to the event handler.
-
+ A function to execute each time the event is triggered.
+
diff --git a/entries/not.xml b/entries/not.xml
index def00389..dec089f6 100644
--- a/entries/not.xml
+++ b/entries/not.xml
@@ -15,13 +15,16 @@
1.4
-
+ A function used as a test for each element in the set. this is the current DOM element.
+
+
+ 1.4
-
+ An existing jQuery object to match the current set of elements against.
diff --git a/entries/off.xml b/entries/off.xml
index 78ab983b..b83e3868 100644
--- a/entries/off.xml
+++ b/entries/off.xml
@@ -10,8 +10,9 @@
A selector which should match the one originally passed to .on() when attaching event handlers.
-
+ A handler function previously attached for the event(s), or the special value false.
+
diff --git a/entries/offset.xml b/entries/offset.xml
index 2b10ef34..9b1a0093 100644
--- a/entries/offset.xml
+++ b/entries/offset.xml
@@ -87,7 +87,10 @@ $( "*", document.body ).click(function( event ) {
1.4
-
+
+
+
+ A function to return the coordinates to set. Receives the index of the element in the collection as the first argument and the current coordinates as the second argument. The function should return an object with the new top and left properties.
diff --git a/entries/on.xml b/entries/on.xml
index a322724e..a875aa37 100644
--- a/entries/on.xml
+++ b/entries/on.xml
@@ -13,8 +13,9 @@
Data to be passed to the handler in event.data when an event is triggered.
-
+ A function to execute when the event is triggered. The value false is also allowed as a shorthand for a function that simply does return false.
+
diff --git a/entries/one.xml b/entries/one.xml
index 8f55d4aa..f923fe0a 100644
--- a/entries/one.xml
+++ b/entries/one.xml
@@ -10,8 +10,9 @@
An object containing data that will be passed to the event handler.
-
+ A function to execute at the time the event is triggered.
+
@@ -25,8 +26,9 @@
Data to be passed to the handler in event.data when an event is triggered.
-
+ A function to execute when the event is triggered. The value false is also allowed as a shorthand for a function that simply does return false.
+
diff --git a/entries/prepend.xml b/entries/prepend.xml
index ca783d51..e1a2b548 100644
--- a/entries/prepend.xml
+++ b/entries/prepend.xml
@@ -20,7 +20,14 @@
1.4
-
+
+
+
+
+
+
+
+ A function that returns an HTML string, DOM element(s), or jQuery object to insert at the beginning of each element in the set of matched elements. Receives the index position of the element in the set and the old HTML value of the element as arguments. Within the function, this refers to the current element in the set.
diff --git a/entries/prop.xml b/entries/prop.xml
index 541f788f..423e2c11 100644
--- a/entries/prop.xml
+++ b/entries/prop.xml
@@ -3,6 +3,7 @@
Get the value of a property for the first element in the set of matched elements or set one or more properties for every matched element.
+ .prop()
@@ -132,7 +133,18 @@ $( "input" ).change(function() {
The name of the property to set.
-
+
+
+
+
+
+
+
+
+
+
+
+ A function returning the value to set. Receives the index position of the element in the set and the old property value as arguments. Within the function, the keyword this refers to the current element.
diff --git a/entries/queue.xml b/entries/queue.xml
index b5d512af..08c5f09a 100644
--- a/entries/queue.xml
+++ b/entries/queue.xml
@@ -80,7 +80,8 @@ showIt();
A string containing the name of the queue. Defaults to fx, the standard effects queue.
-
+
+ The new function to add to the queue, with a function to call that will dequeue the next item.
diff --git a/entries/removeClass.xml b/entries/removeClass.xml
index d172f88e..8bb11196 100644
--- a/entries/removeClass.xml
+++ b/entries/removeClass.xml
@@ -9,7 +9,10 @@
1.4
-
+
+
+
+ A function returning one or more space-separated class names to be removed. Receives the index position of the element in the set and the old class value as arguments.
diff --git a/entries/resize.xml b/entries/resize.xml
index f7c9c2dd..280ff015 100644
--- a/entries/resize.xml
+++ b/entries/resize.xml
@@ -4,8 +4,9 @@
Bind an event handler to the "resize" JavaScript event, or trigger that event on an element.1.0
-
+ A function to execute each time the event is triggered.
+
@@ -13,8 +14,9 @@
An object containing data that will be passed to the event handler.
-
+ A function to execute each time the event is triggered.
+
diff --git a/entries/scroll.xml b/entries/scroll.xml
index 080ecdc9..1f0e6454 100644
--- a/entries/scroll.xml
+++ b/entries/scroll.xml
@@ -4,8 +4,9 @@
Bind an event handler to the "scroll" JavaScript event, or trigger that event on an element.1.0
-
+ A function to execute each time the event is triggered.
+
@@ -13,8 +14,9 @@
An object containing data that will be passed to the event handler.
-
+ A function to execute each time the event is triggered.
+
diff --git a/entries/select.xml b/entries/select.xml
index cb0cc4e8..44e51043 100644
--- a/entries/select.xml
+++ b/entries/select.xml
@@ -4,8 +4,9 @@
Bind an event handler to the "select" JavaScript event, or trigger that event on an element.1.0
-
+ A function to execute each time the event is triggered.
+
@@ -13,8 +14,9 @@
An object containing data that will be passed to the event handler.
-
+ A function to execute each time the event is triggered.
+
diff --git a/entries/submit.xml b/entries/submit.xml
index ec3c5025..38ee1f06 100644
--- a/entries/submit.xml
+++ b/entries/submit.xml
@@ -4,8 +4,9 @@
Bind an event handler to the "submit" JavaScript event, or trigger that event on an element.1.0
-
+ A function to execute each time the event is triggered.
+
@@ -13,8 +14,9 @@
An object containing data that will be passed to the event handler.
-
+ A function to execute each time the event is triggered.
+
diff --git a/entries/text.xml b/entries/text.xml
index 8ba40495..3752dd10 100644
--- a/entries/text.xml
+++ b/entries/text.xml
@@ -61,7 +61,10 @@ $( "p:last" ).html( str );
1.4
-
+
+
+
+ A function returning the text content to set. Receives the index position of the element in the set and the old text value as arguments.
diff --git a/entries/toggle-event.xml b/entries/toggle-event.xml
index ed329adb..a095eace 100644
--- a/entries/toggle-event.xml
+++ b/entries/toggle-event.xml
@@ -4,14 +4,17 @@
Bind two or more handlers to the matched elements, to be executed on alternate clicks.1.0
-
+ A function to execute every even time the element is clicked.
+
-
+ A function to execute every odd time the element is clicked.
+
-
+ Additional handlers to cycle through after clicks.
+
diff --git a/entries/toggleClass.xml b/entries/toggleClass.xml
index 9fcb5a94..a4516652 100644
--- a/entries/toggleClass.xml
+++ b/entries/toggleClass.xml
@@ -24,7 +24,11 @@
1.4
-
+
+
+
+
+ A function that returns class names to be toggled in the class attribute of each element in the matched set. Receives the index position of the element in the set, the old class value, and the switch as arguments.
diff --git a/entries/unbind.xml b/entries/unbind.xml
index 19a3d8a0..f7f61514 100644
--- a/entries/unbind.xml
+++ b/entries/unbind.xml
@@ -7,8 +7,9 @@
A string containing a JavaScript event type, such as click or submit.
-
+ The function that is to be no longer executed.
+
diff --git a/entries/undelegate.xml b/entries/undelegate.xml
index 460410d5..842a504a 100644
--- a/entries/undelegate.xml
+++ b/entries/undelegate.xml
@@ -22,8 +22,9 @@
A string containing a JavaScript event type, such as "click" or "keydown"
-
+ A function to execute at the time the event is triggered.
+
diff --git a/entries/unload.xml b/entries/unload.xml
index 077ec6fc..9fc62283 100644
--- a/entries/unload.xml
+++ b/entries/unload.xml
@@ -3,8 +3,9 @@
.unload()1.0
-
+ A function to execute when the event is triggered.
+
@@ -12,8 +13,9 @@
A plain object of data that will be passed to the event handler.
-
+ A function to execute each time the event is triggered.
+ Bind an event handler to the "unload" JavaScript event.
diff --git a/entries/val.xml b/entries/val.xml
index 9285a546..27cbc392 100644
--- a/entries/val.xml
+++ b/entries/val.xml
@@ -112,7 +112,10 @@ $( "input" )
1.4
-
+
+
+
+ A function returning the value to set. this is the current element. Receives the index position of the element in the set and the old value as arguments.
diff --git a/entries/width.xml b/entries/width.xml
index 27ac3a0d..bbef2fd0 100644
--- a/entries/width.xml
+++ b/entries/width.xml
@@ -86,7 +86,13 @@ $("#getw").click(function() {
1.4.1
-
+
+
+
+
+
+
+ A function returning the width to set. Receives the index position of the element in the set and the old width as arguments. Within the function, this refers to the current element in the set.
diff --git a/entries/wrap.xml b/entries/wrap.xml
index 1f8f2f91..02bce46c 100644
--- a/entries/wrap.xml
+++ b/entries/wrap.xml
@@ -13,8 +13,13 @@
1.4
-
+ A callback function returning the HTML content or jQuery object to wrap around the matched elements. Receives the index position of the element in the set as an argument. Within the function, this refers to the current element in the set.
+
+
+
+
+ Wrap an HTML structure around each element in the set of matched elements.
diff --git a/entries/wrapInner.xml b/entries/wrapInner.xml
index a3e1ef49..6a459161 100644
--- a/entries/wrapInner.xml
+++ b/entries/wrapInner.xml
@@ -9,8 +9,10 @@
1.4
-
+ A callback function which generates a structure to wrap around the content of the matched elements. Receives the index position of the element in the set as an argument. Within the function, this refers to the current element in the set.
+
+ Wrap an HTML structure around the content of each element in the set of matched elements.
From edf0730d4a5ac67af00ee2f911e1d5a706bdee6e Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Olav=20Junker=20Kj=C3=A6r?=
Date: Sat, 17 May 2014 15:17:38 +0200
Subject: [PATCH 057/699] prop: Change values to Anything type
Fixes gh-496
Closes gh-497
---
entries/prop.xml | 23 +++++------------------
1 file changed, 5 insertions(+), 18 deletions(-)
diff --git a/entries/prop.xml b/entries/prop.xml
index 423e2c11..adccbc85 100644
--- a/entries/prop.xml
+++ b/entries/prop.xml
@@ -2,9 +2,7 @@
Get the value of a property for the first element in the set of matched elements or set one or more properties for every matched element.
-
-
-
+ .prop()1.6
@@ -115,10 +113,7 @@ $( "input" ).change(function() {
The name of the property to set.
-
-
-
-
+ A value to set for the property.
@@ -134,17 +129,9 @@ $( "input" ).change(function() {
The name of the property to set.
-
-
-
-
-
-
-
-
-
-
-
+
+
+ A function returning the value to set. Receives the index position of the element in the set and the old property value as arguments. Within the function, the keyword this refers to the current element.
From 005432107ba30fb140d7cb8b26f12204ae2daaa9 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Scott=20Gonz=C3=A1lez?=
Date: Mon, 26 May 2014 11:41:57 -0400
Subject: [PATCH 058/699] 1.11.10
---
package.json | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/package.json b/package.json
index 47d187f9..49b27803 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.11.9",
+ "version": "1.11.10",
"homepage": "https://github.com/jquery/api.jquery.com",
"author": {
"name": "jQuery Foundation (https://jquery.org/)"
From f0bfb23213dff4e27de020ec3530b138e23f3881 Mon Sep 17 00:00:00 2001
From: Usman Akeju
Date: Mon, 2 Jun 2014 20:19:28 +0200
Subject: [PATCH 059/699] Types: Document "Anything" virtual type
Ref gh-391
Closes gh-504
---
pages/Types.html | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/pages/Types.html b/pages/Types.html
index 5a4f10d6..073fd0aa 100644
--- a/pages/Types.html
+++ b/pages/Types.html
@@ -35,6 +35,7 @@
The Anything virtual type is used in jQuery documentation to indicate that any type can be used or should be expected.
+
+
String
A string in JavaScript is an immutable object that contains none, one or many characters.
From d0f0b6d95a3ee33beac33c7652788b34bd33b221 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Scott=20Gonz=C3=A1lez?=
Date: Tue, 27 May 2014 13:43:34 -0400
Subject: [PATCH 060/699] Build: Update license
Closes gh-502
---
LICENSE-MIT.txt => LICENSE.txt | 27 ++++++++++++++++++++++++---
1 file changed, 24 insertions(+), 3 deletions(-)
rename LICENSE-MIT.txt => LICENSE.txt (60%)
diff --git a/LICENSE-MIT.txt b/LICENSE.txt
similarity index 60%
rename from LICENSE-MIT.txt
rename to LICENSE.txt
index 27ec7f48..01839718 100644
--- a/LICENSE-MIT.txt
+++ b/LICENSE.txt
@@ -1,9 +1,15 @@
-Copyright (c) 2009 Packt Publishing, http://packtpub.com/
-Copyright (c) 2013 jQuery Foundation, https://jquery.org/
+Copyright 2009 Packt Publishing, http://packtpub.com/
+Copyright 2012, 2014 jQuery Foundation and other contributors,
+https://jquery.org/
This software consists of voluntary contributions made by many
individuals. For exact contribution history, see the revision history
-and logs, available at https://github.com/jquery/api.jquery.com
+available at https://github.com/jquery/api.jquery.com
+
+The following license applies to all parts of this software except as
+documented below:
+
+====
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
@@ -23,3 +29,18 @@ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+====
+
+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/
+
+====
+
+All files located in the node_modules directory are externally
+maintained libraries used by this software which have their own
+licenses; we recommend you read them, as their terms may differ from the
+terms above.
From 630f90bb079d2bad992cd15358f453b10b0ae9be Mon Sep 17 00:00:00 2001
From: Usman Akeju
Date: Sat, 5 Jul 2014 17:21:43 -0400
Subject: [PATCH 061/699] jQuery.browser: Mark as removed. Closes gh-513
---
entries/jQuery.browser.xml | 1 +
1 file changed, 1 insertion(+)
diff --git a/entries/jQuery.browser.xml b/entries/jQuery.browser.xml
index fe0f3add..e7c690ac 100644
--- a/entries/jQuery.browser.xml
+++ b/entries/jQuery.browser.xml
@@ -48,6 +48,7 @@ $.browser.msie;
+
From 8ad0c6021786795dda56743a435c70ce4beb3ba8 Mon Sep 17 00:00:00 2001
From: Markus Staab
Date: Sat, 5 Jul 2014 17:48:28 -0400
Subject: [PATCH 062/699] .ajaxError(): parameter name in example -> . Closes
#439
---
entries/ajaxError.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/entries/ajaxError.xml b/entries/ajaxError.xml
index fbee691d..d13f71e6 100644
--- a/entries/ajaxError.xml
+++ b/entries/ajaxError.xml
@@ -36,7 +36,7 @@ $( "button.trigger" ).on( "click", function() {
As of jQuery 1.8, the .ajaxError() method should only be attached to document.
All ajaxError handlers are invoked, regardless of what Ajax request was completed. To differentiate between the requests, use the parameters passed to the handler. Each time an ajaxError handler is executed, it is passed the event object, the jqXHR object (prior to jQuery 1.5, the XHR object), and the settings object that was used in the creation of the request. When an HTTP error occurs, the fourth argument (thrownError) receives the textual portion of the HTTP status, such as "Not Found" or "Internal Server Error." For example, to restrict the error callback to only handling events dealing with a particular URL:
-$( document ).ajaxError(function( event, jqxhr, settings, exception ) {
+$( document ).ajaxError(function( event, jqxhr, settings, thrownError ) {
if ( settings.url == "ajax/missing.html" ) {
$( "div.log" ).text( "Triggered ajaxError handler." );
}
From 4418ffc682b1513be5f30ed0fa6f66c06062dba1 Mon Sep 17 00:00:00 2001
From: Aurelio De Rosa
Date: Sat, 5 Jul 2014 18:43:10 -0400
Subject: [PATCH 063/699] jQuery.ajax(): data option can also be an Array.
Closes #480
---
entries/jQuery.ajax.xml | 1 +
1 file changed, 1 insertion(+)
diff --git a/entries/jQuery.ajax.xml b/entries/jQuery.ajax.xml
index 3b70d572..33f985de 100644
--- a/entries/jQuery.ajax.xml
+++ b/entries/jQuery.ajax.xml
@@ -61,6 +61,7 @@ $.ajax({
+ Data to be sent to the server. It is converted to a query string, if not already a string. It's appended to the url for GET-requests. See processData option to prevent this automatic processing. Object must be Key/Value pairs. If value is an Array, jQuery serializes multiple values with same key based on the value of the traditional setting (described below).
From 03710c0966cf50d7e7801dc8db49b9f67813b590 Mon Sep 17 00:00:00 2001
From: John Reilly
Date: Sat, 5 Jul 2014 18:46:35 -0400
Subject: [PATCH 064/699] ajaxComplete(): responseXML -> responseText. Closes
#483
---
entries/ajaxComplete.xml | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/entries/ajaxComplete.xml b/entries/ajaxComplete.xml
index 3ff3b58c..7f045973 100644
--- a/entries/ajaxComplete.xml
+++ b/entries/ajaxComplete.xml
@@ -38,11 +38,11 @@ $( ".trigger" ).click(function() {
$( document ).ajaxComplete(function( event, xhr, settings ) {
if ( settings.url === "ajax/test.html" ) {
$( ".log" ).text( "Triggered ajaxComplete handler. The result is " +
- xhr.responseHTML );
+ xhr.responseText );
}
});
-
Note: You can get the returned ajax contents by looking at xhr.responseXML or xhr.responseHTML for xml and html respectively.
+
Note: You can get the returned ajax contents by looking at xhr.responseText.
From 517615b8277305af5fd4546d9062ceadaa93c18a Mon Sep 17 00:00:00 2001
From: Konstantin
Date: Sat, 5 Jul 2014 18:55:34 -0400
Subject: [PATCH 065/699] jQuery.ajax(): Note settings that could trigger a
preflight OPTIONS request. Closes #488
---
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 33f985de..9ebf3145 100644
--- a/entries/jQuery.ajax.xml
+++ b/entries/jQuery.ajax.xml
@@ -38,7 +38,7 @@
An object of string/regular-expression pairs that determine how jQuery will parse the response, given its content type.
- When sending data to the server, use this content type. Default is "application/x-www-form-urlencoded; charset=UTF-8", which is fine for most cases. If you explicitly pass in a content-type to $.ajax(), then it is always sent to the server (even if no data is sent). The W3C XMLHttpRequest specification dictates that the charset is always UTF-8; specifying another charset will not force the browser to change the encoding.
+ When sending data to the server, use this content type. Default is "application/x-www-form-urlencoded; charset=UTF-8", which is fine for most cases. If you explicitly pass in a content-type to $.ajax(), then it is always sent to the server (even if no data is sent). The W3C XMLHttpRequest specification dictates that the charset is always UTF-8; specifying another charset will not force the browser to change the encoding. Note: For cross-domain requests, setting the content type to anything other than application/x-www-form-urlencoded, multipart/form-data, or text/plain will trigger the browser to send a preflight OPTIONS request to the server.This object will be made the context of all Ajax-related callbacks. By default, the context is an object that represents the ajax settings used in the call ($.ajaxSettings merged with the settings passed to $.ajax). For example, specifying a DOM element as the context will make that the context for the complete callback of a request, like so:
From cec12dfc344e2ad501db4077ae638055b76665f1 Mon Sep 17 00:00:00 2001
From: Tom Fuertes
Date: Sat, 5 Jul 2014 19:53:17 -0400
Subject: [PATCH 066/699] one(): Fix description of behavior for delegated
.one() events. Closes #489
---
entries/one.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/entries/one.xml b/entries/one.xml
index f923fe0a..3b53235e 100644
--- a/entries/one.xml
+++ b/entries/one.xml
@@ -50,7 +50,7 @@ $( "#foo" ).one( "click", function() {
alert( "This will be displayed only once." );
});
$( "body" ).one( "click", "#foo", function() {
- alert( "This displays if #foo is the first thing clicked in the body." );
+ alert( "This displays the first time #foo is clicked in the body." );
});
After the code is executed, a click on the element with ID foo will display the alert. Subsequent clicks will do nothing. This code is equivalent to:
To create a Date object for an alternative date and time, pass numeric arguments in the following order: year, month, day, minute, second, millisecond — although note that the month is zero-based, whereas the other arguments are one-based. The following creates a Date object representing January 1st, 2014, at 8:15.
+
To create a Date object for an alternative date and time, pass numeric arguments in the following order: year, month, day, hour, minute, second, millisecond — although note that the month is zero-based, whereas the other arguments are one-based. The following creates a Date object representing January 1st, 2014, at 8:15.
new Date( 2014, 0, 1, 8, 15 );
From bffd21edd5d6fe7addafb7651e5877fad079e318 Mon Sep 17 00:00:00 2001
From: Nick Bottomley
Date: Sat, 5 Jul 2014 22:14:02 -0400
Subject: [PATCH 068/699] deferred.notifyWith(): second argument takes Array.
Closes #461
---
entries/deferred.notifyWith.xml | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/entries/deferred.notifyWith.xml b/entries/deferred.notifyWith.xml
index 79c845ef..add312b8 100644
--- a/entries/deferred.notifyWith.xml
+++ b/entries/deferred.notifyWith.xml
@@ -8,9 +8,9 @@
Context passed to the progressCallbacks as the this object.
-
+
- Optional arguments that are passed to the progressCallbacks.
+ An optional array of arguments that are passed to the progressCallbacks.
From 6efa8ef5eb09d29492ec9a552ad2cdbee978528a Mon Sep 17 00:00:00 2001
From: Timo Tijhof
Date: Sun, 6 Jul 2014 15:24:46 -0400
Subject: [PATCH 069/699] attribute-contains-selector: Remove odd word from
desc Fixes #507. Closes #508
---
entries/attribute-contains-selector.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/entries/attribute-contains-selector.xml b/entries/attribute-contains-selector.xml
index 691b3f4e..8cb21dfc 100644
--- a/entries/attribute-contains-selector.xml
+++ b/entries/attribute-contains-selector.xml
@@ -11,7 +11,7 @@
An attribute value. Can be either an unquoted single word or a quoted string.
- Selects elements that have the specified attribute with a value containing the a given substring.
+ Selects elements that have the specified attribute with a value containing a given substring.
This is the most generous of the jQuery attribute selectors that match against a value. It will select an element if the selector's string appears anywhere within the element's attribute value. Compare this selector with the Attribute Contains Word selector (e.g. [attr~="word"]), which is more appropriate in many cases.
When this property is set to true, all animation methods will immediately set elements to their final state when called, rather than displaying an effect. This may be desirable for a couple reasons:
jQuery is being used on a low-resource device.
-
Users are encountering accessibility problems with the animations (see the article Turn Off Animation for more information).
+
Users are encountering accessibility problems with the animations.
Animations can be turned back on by setting the property to false.
From 08e6cefcd6dff6ddd43d2eb8c95b670bbdb708d3 Mon Sep 17 00:00:00 2001
From: Aurelio De Rosa
Date: Sun, 6 Jul 2014 15:36:28 -0400
Subject: [PATCH 071/699] .is(): Refer to 2nd argument of function argument.
Fixes #512. Closes #517
---
entries/is.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/entries/is.xml b/entries/is.xml
index 2a14f6a3..5595d26a 100644
--- a/entries/is.xml
+++ b/entries/is.xml
@@ -10,7 +10,7 @@
1.6
- A function used as a test for the set of elements. It accepts one argument, index, which is the element's index in the jQuery collection. Within the function, this refers to the current DOM element.
+ A function used as a test for every element in the set. It accepts two arguments, index, which is the element's index in the jQuery collection, and element, which is the DOM element. Within the function, this refers to the current DOM element.
From 3fc31d08f030a483b5bcd2adf86c5ef5383aab40 Mon Sep 17 00:00:00 2001
From: Aurelio De Rosa
Date: Sun, 6 Jul 2014 15:39:35 -0400
Subject: [PATCH 072/699] .not(): Clean up signatures/arguments. Fixes #452.
Closes #515
---
entries/not.xml | 13 +++++--------
1 file changed, 5 insertions(+), 8 deletions(-)
diff --git a/entries/not.xml b/entries/not.xml
index dec089f6..6b5cf416 100644
--- a/entries/not.xml
+++ b/entries/not.xml
@@ -3,14 +3,11 @@
.not()1.0
-
- A string containing a selector expression to match elements against.
-
-
-
- 1.0
-
- One or more DOM elements to remove from the matched set.
+
+ A string containing a selector expression, a DOM element, or an array of elements to match against the set.
+
+
+
From ebc7dbcf4655d6f39fb661142601c816966620d9 Mon Sep 17 00:00:00 2001
From: Aurelio De Rosa
Date: Sun, 6 Jul 2014 15:42:30 -0400
Subject: [PATCH 073/699] .not(): Improve documentation for Function parameter.
Closes #518
---
entries/not.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/entries/not.xml b/entries/not.xml
index 6b5cf416..059e5e29 100644
--- a/entries/not.xml
+++ b/entries/not.xml
@@ -13,7 +13,7 @@
1.4
- A function used as a test for each element in the set. this is the current DOM element.
+ A function used as a test for each element in the set. It accepts two arguments, index, which is the element's index in the jQuery collection, and element, which is the DOM element. Within the function, this refers to the current DOM element.
From c08ab1caa1de01a1fee7cb4523051c50b3c8ef0b Mon Sep 17 00:00:00 2001
From: Karl Swedberg
Date: Sun, 6 Jul 2014 15:57:29 -0400
Subject: [PATCH 074/699] Types page: improve wording of Element section
---
pages/Types.html | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/pages/Types.html b/pages/Types.html
index b003f444..3889f34f 100644
--- a/pages/Types.html
+++ b/pages/Types.html
@@ -582,19 +582,19 @@
Event
The standard events in the Document Object Model are: blur, focus, load, resize, scroll, unload, beforeunload, click, dblclick, mousedown, mouseup, mousemove, mouseover, mouseout, mouseenter, mouseleave, change, select, submit, keydown, keypress, and keyup. Since the DOM event names have predefined meanings for some elements, using them for other purposes is not recommended. jQuery's event model can trigger an event by any name on an element, and it is propagated up the DOM tree to which that element belongs, if any.
Element
-
An element in the Document Object Model (DOM) has attributes, text and children. It provides methods to traverse the parent and children and to get access to its attributes. Due to a lot of flaws in DOM API specifications and implementations, those methods are no fun to use. jQuery provides a wrapper around those elements to help interacting with the DOM. But often enough you will be working directly with DOM elements, or see methods that (also) accept DOM elements as arguments.
+
An element in the Document Object Model (DOM) can have attributes, text, and children. It provides methods to traverse the parent and children and to get access to its attributes. Due to inconsistencies in DOM API specifications and implementations, however, those methods can be a challenge to use. jQuery provides a "wrapper" around those elements to help interacting with the DOM. But sometimes you will be working directly with DOM elements, or see methods that (also) accept DOM elements as arguments.
-
Whenever you use jQuery's each-method, the context of your callback is set to a DOM element. That is also the case for event handlers.
+
Whenever you call jQuery's .each() method or one of its event methods on a jQuery collection, the context of the callback function — this — is set to a DOM element.
-
Some properties of DOM elements are quite consistent among browsers. Consider this example of a simple on-blur-validation:
+
Some properties of DOM elements are quite consistent among browsers. Consider this example of a simple onblur validation:
-
$( ":text" ).blur(function() {
+
$( "input[type='text']" ).on( "blur", function() {
if( !this.value ) {
alert( "Please enter some text!" );
}
});
-
You could replace this.value with $(this).val() to access the value of the text input via jQuery, but in that case you don't gain anything.
+
You could replace this.value with $(this).val() to access the value of the text input via jQuery, but in that case you wouldn't gain anything.
jQuery
A jQuery object contains a collection of Document Object Model (DOM) elements that have been created from an HTML string or selected from a document. Since jQuery methods often use CSS selectors to match elements from a document, the set of elements in a jQuery object is often called a set of "matched elements" or "selected elements".
From 73f074b4b554633217bd07c91eb52343973917ef Mon Sep 17 00:00:00 2001
From: Karl Swedberg
Date: Sun, 6 Jul 2014 16:07:16 -0400
Subject: [PATCH 075/699] 1.11.11
---
package.json | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/package.json b/package.json
index 49b27803..4a338267 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.11.10",
+ "version": "1.11.11",
"homepage": "https://github.com/jquery/api.jquery.com",
"author": {
"name": "jQuery Foundation (https://jquery.org/)"
From 65733cfd6e7cadf5743d8463c7b12c9750d5142c Mon Sep 17 00:00:00 2001
From: Aurelio De Rosa
Date: Sun, 6 Jul 2014 21:38:49 -0400
Subject: [PATCH 076/699] wrapInner(): Add accepted types for the
wrappingElement argument. Closes #520
---
entries/wrapInner.xml | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/entries/wrapInner.xml b/entries/wrapInner.xml
index 6a459161..42e0101a 100644
--- a/entries/wrapInner.xml
+++ b/entries/wrapInner.xml
@@ -3,8 +3,12 @@
.wrapInner()1.2
-
+ An HTML snippet, selector expression, jQuery object, or DOM element specifying the structure to wrap around the content of the matched elements.
+
+
+
+
From a1ddea947b273fb6375b035d0f468b32cd661d23 Mon Sep 17 00:00:00 2001
From: Aurelio De Rosa
Date: Mon, 7 Jul 2014 09:07:30 -0400
Subject: [PATCH 077/699] wrapAll(): Add missing documentation of the
possibility to pass a function (since jQuery 1.4). Closes #521
---
entries/wrapAll.xml | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/entries/wrapAll.xml b/entries/wrapAll.xml
index c4c7c49a..80112ca0 100644
--- a/entries/wrapAll.xml
+++ b/entries/wrapAll.xml
@@ -11,6 +11,14 @@
A selector, element, HTML string, or jQuery object specifying the structure to wrap around the matched elements.
+
+ 1.4
+
+ A function that returns a structure to wrap around the matched elements. Receives the index position of the element in the set as an argument. Within the function, this refers to the current element in the set.
+
+
+
+ Wrap an HTML structure around all elements in the set of matched elements.
The .wrapAll() function can take any string or object that could be passed to the $() function to specify a DOM structure. This structure may be nested several levels deep, but should contain only one inmost element. The structure will be wrapped around all of the elements in the set of matched elements, as a single group.
From c46264705e04b873a28043582a692e2d6e41f7f0 Mon Sep 17 00:00:00 2001
From: Karl Swedberg
Date: Mon, 7 Jul 2014 09:19:44 -0400
Subject: [PATCH 078/699] 1.11.12
---
package.json | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/package.json b/package.json
index 4a338267..4d3c5a10 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.11.11",
+ "version": "1.11.12",
"homepage": "https://github.com/jquery/api.jquery.com",
"author": {
"name": "jQuery Foundation (https://jquery.org/)"
From 9959d69147ea0a7edba9201055363aacba213bda Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?B=2E=20Agust=C3=ADn=20Amenabar=20L?=
Date: Tue, 8 Jul 2014 17:33:16 -0400
Subject: [PATCH 079/699] jQuery.inArray(): Note that inArray campares values
strictly. Closes #470
---
entries/jQuery.inArray.xml | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/entries/jQuery.inArray.xml b/entries/jQuery.inArray.xml
index 16e43b60..e7a3ca80 100644
--- a/entries/jQuery.inArray.xml
+++ b/entries/jQuery.inArray.xml
@@ -16,7 +16,9 @@
Search for a specified value within an array and return its index (or -1 if not found).
The $.inArray() method is similar to JavaScript's native .indexOf() method in that it returns -1 when it doesn't find a match. If the first element within the array matches value, $.inArray() returns 0.
-
Because JavaScript treats 0 as loosely equal to false (i.e. 0 == false, but 0 !== false), if we're checking for the presence of value within array, we need to check if it's not equal to (or greater than) -1.
+
Because JavaScript treats 0 as loosely equal to false (i.e. 0 == false, but 0 !== false), to check for the presence of value within array, you need to check if it's not equal to (or greater than) -1.
+
The comparison between values is strict. The following will return -1 (not found) because a number is being searched in an array of strings:
+
$.inArray( 5 + 5, [ "8", "9", "10", 10 + "" ] );
Report the index of some elements in the array.
From fd3b18b4a5bcc92b57a481245a0f8d48986730e9 Mon Sep 17 00:00:00 2001
From: Tom Fuertes
Date: Wed, 9 Jul 2014 22:24:02 -0400
Subject: [PATCH 080/699] one(): Fix description of behavior for delegated
.one() events. Closes #519
---
entries/one.xml | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/entries/one.xml b/entries/one.xml
index 3b53235e..1327dbf0 100644
--- a/entries/one.xml
+++ b/entries/one.xml
@@ -44,13 +44,10 @@
-
The first form of this method is identical to .bind(), except that the handler is unbound after its first invocation. The second two forms, introduced in jQuery 1.7, are identical to .on() except that the handler is removed after the first time the event occurs at the delegated element, whether the selector matched anything or not. For example:
+
The .one() method is identical to .on(), except that the handler is unbound after its first invocation. For example:
$( "#foo" ).one( "click", function() {
alert( "This will be displayed only once." );
-});
-$( "body" ).one( "click", "#foo", function() {
- alert( "This displays the first time #foo is clicked in the body." );
});
After the code is executed, a click on the element with ID foo will display the alert. Subsequent clicks will do nothing. This code is equivalent to:
Since each request requires its own transport object instance, transports cannot be registered directly. Therefore, you should provide a function that returns a transport instead.
Transports factories are registered using $.ajaxTransport(). A typical registration looks like this:
-$.ajaxTransport(function( options, originalOptions, jqXHR ) {
+$.ajaxTransport( dataType, function( options, originalOptions, jqXHR ) {
if( /* transportCanHandleRequest */ ) {
return {
send: function( headers, completeCallback ) {
From e1a33e0e9f046f6deef01711b1afd1b894805770 Mon Sep 17 00:00:00 2001
From: Matt Lunn
Date: Sat, 12 Jul 2014 11:39:58 -0400
Subject: [PATCH 083/699] Added notes that replaceWith() and replaceAll()
remove node data
---
entries/replaceAll.xml | 3 ++-
entries/replaceWith.xml | 1 +
notes.xsl | 3 +++
3 files changed, 6 insertions(+), 1 deletion(-)
diff --git a/entries/replaceAll.xml b/entries/replaceAll.xml
index 8dd9f191..64759e81 100644
--- a/entries/replaceAll.xml
+++ b/entries/replaceAll.xml
@@ -13,7 +13,7 @@
Replace each target element with the set of matched elements.
-
The .replaceAll() method is corollary to .replaceWith(), but with the source and target reversed. Consider this DOM structure:
+
The .replaceAll() method is similar to .replaceWith(), but with the source and target reversed. Consider this DOM structure:
From this example, we can see that the selected element replaces the target by being moved from its old location, not by being cloned.
+ Replace all the paragraphs with bold words.This example demonstrates that the selected element replaces the target by being moved from its old location, not by being cloned.
The .replaceWith() method, like most jQuery methods, returns the jQuery object so that other methods can be chained onto it. However, it must be noted that the original jQuery object is returned. This object refers to the element that has been removed from the DOM, not the new element that has replaced it.
+ On click, replace the button with a div containing the same word.
diff --git a/notes.xsl b/notes.xsl
index 6f1029d4..6d4ed1fb 100644
--- a/notes.xsl
+++ b/notes.xsl
@@ -7,6 +7,9 @@
Prior to jQuery 1.9, would attempt to add or change nodes in the current jQuery set if the first node in the set was not connected to a document, and in those cases return a new jQuery set rather than the original set. The method might or might not have returned a new result depending on the number or connectedness of its arguments! As of jQuery 1.9, .after(), .before(), and .replaceWith() always return the original unmodified set. Attempting to use these methods on a node without a parent has no effect—that is, neither the set nor the nodes it contains are changed.
+
+ The method removes all data and event handlers associated with the removed nodes.
+
Selected elements are in the order of their appearance in the document.
From 9cd7cee4c6cae7a277d1d16e4e1b5a3493f00f27 Mon Sep 17 00:00:00 2001
From: Karl Swedberg
Date: Sat, 12 Jul 2014 11:42:29 -0400
Subject: [PATCH 084/699] 1.11.14
---
package.json | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/package.json b/package.json
index 0611958f..7ec6f18b 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.11.13",
+ "version": "1.11.14",
"homepage": "https://github.com/jquery/api.jquery.com",
"author": {
"name": "jQuery Foundation (https://jquery.org/)"
From bed527e567095c668f77ef44f5f0d429c66a5aca Mon Sep 17 00:00:00 2001
From: Aurelio De Rosa
Date: Sun, 13 Jul 2014 08:49:38 -0400
Subject: [PATCH 085/699] jQuery(): Fix small typo. Closes #525
---
entries/jQuery.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/entries/jQuery.xml b/entries/jQuery.xml
index 9fb438b1..ad58d2c7 100644
--- a/entries/jQuery.xml
+++ b/entries/jQuery.xml
@@ -175,7 +175,7 @@ $( myForm.elements ).hide();
For explicit parsing of a string to HTML, use the $.parseHTML() method.
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.
+
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.
To ensure cross-platform compatibility, the snippet must be well-formed. Tags that can contain other elements should be paired with a closing tag:
Elements are considered visible if they consume space in the document. Visible elements have a width or height that is greater than zero.
Elements with visibility: hidden or opacity: 0 are considered visible, since they still consume space in the layout.
-
Elements that are not in a document are considered to be hidden; 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.
-
During animations that hide an element, the element is considered to be visible until the end of the animation. During animations to show an element, the element is considered to be visible at the start at the animation.
+
Elements that are not in a document are considered hidden; 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.
+
All option elements are considered hidden, regardless of their selected state.
+
During animations that hide an element, the element is considered visible until the end of the animation. During animations to show an element, the element is considered visible at the start at the animation.
How :visible is calculated was changed in jQuery 1.3.2. The release notes outline the changes in more detail.
From 62e06654e896f53f676020c05dbc6617fdf0d1dd Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Scott=20Gonz=C3=A1lez?=
Date: Tue, 19 Aug 2014 16:56:03 -0400
Subject: [PATCH 089/699] Build: Upgrade to grunt-jquery-content 0.12.0
---
package.json | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/package.json b/package.json
index be48f017..c596290b 100644
--- a/package.json
+++ b/package.json
@@ -24,7 +24,7 @@
"grunt": "0.3.17",
"grunt-clean": "0.3.0",
"grunt-wordpress": "1.0.7",
- "grunt-jquery-content": "0.11.3",
+ "grunt-jquery-content": "0.12.0",
"grunt-check-modules": "0.1.0"
},
"devDependencies": {},
From b2173569981481cafd0f2f78cea6cc9e62c5f216 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Scott=20Gonz=C3=A1lez?=
Date: Tue, 19 Aug 2014 16:56:06 -0400
Subject: [PATCH 090/699] 1.11.15
---
package.json | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/package.json b/package.json
index c596290b..15fce595 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.11.14",
+ "version": "1.11.15",
"homepage": "https://github.com/jquery/api.jquery.com",
"author": {
"name": "jQuery Foundation (https://jquery.org/)"
From 536292ca835a44c20a107894f468bd3cfd8bd8ca Mon Sep 17 00:00:00 2001
From: Andy Li
Date: Tue, 19 Aug 2014 22:40:13 -0400
Subject: [PATCH 091/699] innerWidth(): Specify the signature of the function
argument.
---
entries/innerWidth.xml | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/entries/innerWidth.xml b/entries/innerWidth.xml
index c2e30f3d..1e5c2bf6 100644
--- a/entries/innerWidth.xml
+++ b/entries/innerWidth.xml
@@ -50,8 +50,14 @@ $( "p:last" ).text( "innerWidth:" + p.innerWidth() );
1.8.0
-
- A function returning the inner width (including padding but not border) to set. Receives the index position of the element in the set and the old inner width as arguments. Within the function, this refers to the current element in the set.
+
+
+
+
+
+
+
+ A function returning the inner width (including padding but not border) to set. Receives the index position of the element in the set and the old inner width as arguments. Within the function, this refers to the current element in the set.Set the CSS inner width of each element in the set of matched elements.
From 9d78f2d17b3083c323c406273e07b4962334358a Mon Sep 17 00:00:00 2001
From: Karl Swedberg
Date: Tue, 19 Aug 2014 22:42:28 -0400
Subject: [PATCH 092/699] innerHeight(): Add documentation for innerHeight as
setter
---
entries/innerHeight.xml | 69 +++++++++++++++++++++++++++++++++++++++++
1 file changed, 69 insertions(+)
diff --git a/entries/innerHeight.xml b/entries/innerHeight.xml
index d8b71770..a7cd3eec 100644
--- a/entries/innerHeight.xml
+++ b/entries/innerHeight.xml
@@ -1,4 +1,7 @@
+
+ Get the current computed inner height (including padding but not border) for the first element in the set of matched elements or set the inner height of every matched element.
+
.innerHeight()
@@ -36,3 +39,69 @@ $( "p:last" ).text( "innerHeight:" + p.innerHeight() );
+
+
+
+ 1.8.0
+
+
+
+ A number representing the number of pixels, or a number along with an optional unit of measure appended (as a string).
+
+
+
+ 1.8.0
+
+
+
+
+
+
+
+ A function returning the inner height (including padding but not border) to set. Receives the index position of the element in the set and the old inner height as arguments. Within the function, this refers to the current element in the set.
+
+
+Set the CSS inner height of each element in the set of matched elements.
+
+
When calling .innerHeight("value"), the value can be either a string (number and unit) or a number. If only a number is provided for the value, jQuery assumes a pixel unit. If a string is provided, however, any valid CSS measurement may be used for the height (such as 100px, 50%, or auto). Note that in modern browsers, the CSS height property does not include padding, border, or margin, unless the box-sizing CSS property is used.
+
If no explicit unit is specified (like "em" or "%") then "px" is assumed.
+
+
+ Change the inner height of each div the first time it is clicked (and change its color).
+
+
+ d
+
d
+
d
+
d
+
d
+]]>
+
+
+
+
+
+
+
+
From d8ee9fa661c543f8e74bfb0b50f021aa9a0062c5 Mon Sep 17 00:00:00 2001
From: Karl Swedberg
Date: Tue, 19 Aug 2014 22:44:12 -0400
Subject: [PATCH 093/699] 1.11.16
---
package.json | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/package.json b/package.json
index 15fce595..dc01a78e 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.11.15",
+ "version": "1.11.16",
"homepage": "https://github.com/jquery/api.jquery.com",
"author": {
"name": "jQuery Foundation (https://jquery.org/)"
From 821f0199223d82a1d8d6cec3bd924e0477792c1b Mon Sep 17 00:00:00 2001
From: Aurelio De Rosa
Date: Wed, 20 Aug 2014 10:47:37 -0400
Subject: [PATCH 094/699] jQuery.ajax(): Uppercase 'JSONP'
---
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 9ebf3145..fd4d1878 100644
--- a/entries/jQuery.ajax.xml
+++ b/entries/jQuery.ajax.xml
@@ -95,7 +95,7 @@ $.ajax({
Allow the current environment to be recognized as "local," (e.g. the filesystem), even if jQuery does not recognize it as such by default. The following protocols are currently recognized as local: file, *-extension, and widget. If the isLocal setting needs modification, it is recommended to do so once in the $.ajaxSetup() method.
- Override the callback function name in a jsonp request. This value will be used instead of 'callback' in the 'callback=?' part of the query string in the url. So {jsonp:'onJSONPLoad'} would result in 'onJSONPLoad=?' passed to the server. As of jQuery 1.5, setting the jsonp option to false prevents jQuery from adding the "?callback" string to the URL or attempting to use "=?" for transformation. In this case, you should also explicitly set the jsonpCallback setting. For example, { jsonp: false, jsonpCallback: "callbackName" }
+ Override the callback function name in a JSONP request. This value will be used instead of 'callback' in the 'callback=?' part of the query string in the url. So {jsonp:'onJSONPLoad'} would result in 'onJSONPLoad=?' passed to the server. As of jQuery 1.5, setting the jsonp option to false prevents jQuery from adding the "?callback" string to the URL or attempting to use "=?" for transformation. In this case, you should also explicitly set the jsonpCallback setting. For example, { jsonp: false, jsonpCallback: "callbackName" }
From 7f5293d8a5cc257009d8cd05e30c8bcc2696ad4a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Scott=20Gonz=C3=A1lez?=
Date: Thu, 21 Aug 2014 08:19:03 -0400
Subject: [PATCH 095/699] innerHeight: Fix typo
---
entries/innerHeight.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/entries/innerHeight.xml b/entries/innerHeight.xml
index a7cd3eec..cf9bb667 100644
--- a/entries/innerHeight.xml
+++ b/entries/innerHeight.xml
@@ -53,7 +53,7 @@ $( "p:last" ).text( "innerHeight:" + p.innerHeight() );
1.8.0
-
+
From a1e3a17bbad3c2d01f3f26ec73644bfcb19d8a8e Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Scott=20Gonz=C3=A1lez?=
Date: Thu, 21 Aug 2014 08:19:33 -0400
Subject: [PATCH 096/699] 1.11.17
---
package.json | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/package.json b/package.json
index dc01a78e..53e488d4 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.11.16",
+ "version": "1.11.17",
"homepage": "https://github.com/jquery/api.jquery.com",
"author": {
"name": "jQuery Foundation (https://jquery.org/)"
From 6f40df9ce96abfaca77f052b494102b302eac1a5 Mon Sep 17 00:00:00 2001
From: John Ryding
Date: Sun, 24 Aug 2014 14:13:33 -0400
Subject: [PATCH 097/699] callbacks.has(): Make argument optional and clarify
description. Closes #453
---
entries/callbacks.has.xml | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/entries/callbacks.has.xml b/entries/callbacks.has.xml
index 44c65247..401c9d85 100644
--- a/entries/callbacks.has.xml
+++ b/entries/callbacks.has.xml
@@ -3,11 +3,11 @@
callbacks.has()1.7
-
+ The callback to search for.
- Determine whether a supplied callback is in a list
+ Determine whether or not the list has any callbacks attached. If a callback is provided as an argument, determine whether it is in a list.Use callbacks.has() to check if a callback list contains a specific callback:
From 51636241f0dfe953b3d9a088e46a85f492cbefaf Mon Sep 17 00:00:00 2001
From: Aurelio De Rosa
Date: Sun, 24 Aug 2014 14:17:03 -0400
Subject: [PATCH 098/699] find(): Merge two similar signatures introduced in
the same version. Closes #555.
---
entries/find.xml | 12 ++++--------
1 file changed, 4 insertions(+), 8 deletions(-)
diff --git a/entries/find.xml b/entries/find.xml
index 16c1d799..b6a82654 100644
--- a/entries/find.xml
+++ b/entries/find.xml
@@ -9,14 +9,10 @@
1.6
-
- A jQuery object to match elements against.
-
-
-
- 1.6
-
- An element to match elements against.
+
+ An element or a jQuery object to match elements against.
+
+ Get the descendants of each element in the current set of matched elements, filtered by a selector, jQuery object, or element.
From d408dd2ea8c6ce8f7bd1a0c87cb805865d1179de Mon Sep 17 00:00:00 2001
From: Karl Swedberg
Date: Sun, 24 Aug 2014 14:33:48 -0400
Subject: [PATCH 099/699] Event docs: eventData argument can accept "Anything."
Fixes #556
---
entries/bind.xml | 4 ++--
entries/blur.xml | 2 +-
entries/change.xml | 2 +-
entries/click.xml | 2 +-
entries/dblclick.xml | 2 +-
entries/delegate.xml | 2 +-
entries/error.xml | 2 +-
entries/focus.xml | 2 +-
entries/focusin.xml | 2 +-
entries/focusout.xml | 2 +-
entries/keydown.xml | 2 +-
entries/keypress.xml | 2 +-
entries/keyup.xml | 2 +-
entries/load-event.xml | 2 +-
entries/mousedown.xml | 2 +-
entries/mouseenter.xml | 2 +-
entries/mouseleave.xml | 2 +-
entries/mousemove.xml | 2 +-
entries/mouseout.xml | 2 +-
entries/mouseover.xml | 2 +-
entries/mouseup.xml | 2 +-
entries/resize.xml | 2 +-
entries/scroll.xml | 2 +-
entries/select.xml | 2 +-
entries/submit.xml | 2 +-
entries/unload.xml | 2 +-
26 files changed, 27 insertions(+), 27 deletions(-)
diff --git a/entries/bind.xml b/entries/bind.xml
index be20d77c..a81e46a8 100644
--- a/entries/bind.xml
+++ b/entries/bind.xml
@@ -6,7 +6,7 @@
A string containing one or more DOM event types, such as "click" or "submit," or custom event names.
-
+ An object containing data that will be passed to the event handler.
@@ -19,7 +19,7 @@
A string containing one or more DOM event types, such as "click" or "submit," or custom event names.
-
+ An object containing data that will be passed to the event handler.
diff --git a/entries/blur.xml b/entries/blur.xml
index ddb9bf99..747a7d1e 100644
--- a/entries/blur.xml
+++ b/entries/blur.xml
@@ -11,7 +11,7 @@
1.4.3
-
+ An object containing data that will be passed to the event handler.
diff --git a/entries/change.xml b/entries/change.xml
index eedea432..4884ff1e 100644
--- a/entries/change.xml
+++ b/entries/change.xml
@@ -11,7 +11,7 @@
1.4.3
-
+ An object containing data that will be passed to the event handler.
diff --git a/entries/click.xml b/entries/click.xml
index c6a014c1..9be0e863 100644
--- a/entries/click.xml
+++ b/entries/click.xml
@@ -11,7 +11,7 @@
1.4.3
-
+ An object containing data that will be passed to the event handler.
diff --git a/entries/dblclick.xml b/entries/dblclick.xml
index ec851198..7db082fe 100644
--- a/entries/dblclick.xml
+++ b/entries/dblclick.xml
@@ -11,7 +11,7 @@
1.4.3
-
+ An object containing data that will be passed to the event handler.
diff --git a/entries/delegate.xml b/entries/delegate.xml
index dd57ffee..e1670e84 100644
--- a/entries/delegate.xml
+++ b/entries/delegate.xml
@@ -23,7 +23,7 @@
A string containing one or more space-separated JavaScript event types, such as "click" or "keydown," or custom event names.
-
+ An object containing data that will be passed to the event handler.
diff --git a/entries/error.xml b/entries/error.xml
index f93ba9fd..ff4a0ccf 100644
--- a/entries/error.xml
+++ b/entries/error.xml
@@ -11,7 +11,7 @@
1.4.3
-
+ An object containing data that will be passed to the event handler.
diff --git a/entries/focus.xml b/entries/focus.xml
index 0651faab..96957219 100644
--- a/entries/focus.xml
+++ b/entries/focus.xml
@@ -11,7 +11,7 @@
1.4.3
-
+ An object containing data that will be passed to the event handler.
diff --git a/entries/focusin.xml b/entries/focusin.xml
index a692e3bb..dd273e67 100644
--- a/entries/focusin.xml
+++ b/entries/focusin.xml
@@ -11,7 +11,7 @@
1.4.3
-
+ An object containing data that will be passed to the event handler.
diff --git a/entries/focusout.xml b/entries/focusout.xml
index 2d110637..b8ac4373 100644
--- a/entries/focusout.xml
+++ b/entries/focusout.xml
@@ -11,7 +11,7 @@
1.4.3
-
+ An object containing data that will be passed to the event handler.
diff --git a/entries/keydown.xml b/entries/keydown.xml
index 893be2a7..d18b6011 100644
--- a/entries/keydown.xml
+++ b/entries/keydown.xml
@@ -10,7 +10,7 @@
1.4.3
-
+ An object containing data that will be passed to the event handler.
diff --git a/entries/keypress.xml b/entries/keypress.xml
index 0724c1bf..bd4fcbf2 100644
--- a/entries/keypress.xml
+++ b/entries/keypress.xml
@@ -11,7 +11,7 @@
1.4.3
-
+ An object containing data that will be passed to the event handler.
diff --git a/entries/keyup.xml b/entries/keyup.xml
index 517d94b9..2d523041 100644
--- a/entries/keyup.xml
+++ b/entries/keyup.xml
@@ -11,7 +11,7 @@
1.4.3
-
+ An object containing data that will be passed to the event handler.
diff --git a/entries/load-event.xml b/entries/load-event.xml
index b8e48626..d95f81bc 100644
--- a/entries/load-event.xml
+++ b/entries/load-event.xml
@@ -11,7 +11,7 @@
1.4.3
-
+ An object containing data that will be passed to the event handler.
diff --git a/entries/mousedown.xml b/entries/mousedown.xml
index 51186203..98f03d33 100644
--- a/entries/mousedown.xml
+++ b/entries/mousedown.xml
@@ -11,7 +11,7 @@
1.4.3
-
+ An object containing data that will be passed to the event handler.
diff --git a/entries/mouseenter.xml b/entries/mouseenter.xml
index 72acea07..ae59e888 100644
--- a/entries/mouseenter.xml
+++ b/entries/mouseenter.xml
@@ -11,7 +11,7 @@
1.4.3
-
+ An object containing data that will be passed to the event handler.
diff --git a/entries/mouseleave.xml b/entries/mouseleave.xml
index af7f8589..25ed2dc7 100644
--- a/entries/mouseleave.xml
+++ b/entries/mouseleave.xml
@@ -11,7 +11,7 @@
1.4.3
-
+ An object containing data that will be passed to the event handler.
diff --git a/entries/mousemove.xml b/entries/mousemove.xml
index 56943fd4..240f92c3 100644
--- a/entries/mousemove.xml
+++ b/entries/mousemove.xml
@@ -11,7 +11,7 @@
1.4.3
-
+ An object containing data that will be passed to the event handler.
diff --git a/entries/mouseout.xml b/entries/mouseout.xml
index 844d886f..664e2164 100644
--- a/entries/mouseout.xml
+++ b/entries/mouseout.xml
@@ -11,7 +11,7 @@
1.4.3
-
+ An object containing data that will be passed to the event handler.
diff --git a/entries/mouseover.xml b/entries/mouseover.xml
index 1ddfd9e5..d8e8b0b0 100644
--- a/entries/mouseover.xml
+++ b/entries/mouseover.xml
@@ -11,7 +11,7 @@
1.4.3
-
+ An object containing data that will be passed to the event handler.
diff --git a/entries/mouseup.xml b/entries/mouseup.xml
index 6006ea69..80d0f619 100644
--- a/entries/mouseup.xml
+++ b/entries/mouseup.xml
@@ -11,7 +11,7 @@
1.4.3
-
+ An object containing data that will be passed to the event handler.
diff --git a/entries/resize.xml b/entries/resize.xml
index 280ff015..53b2a4cf 100644
--- a/entries/resize.xml
+++ b/entries/resize.xml
@@ -11,7 +11,7 @@
1.4.3
-
+ An object containing data that will be passed to the event handler.
diff --git a/entries/scroll.xml b/entries/scroll.xml
index 1f0e6454..372d6c64 100644
--- a/entries/scroll.xml
+++ b/entries/scroll.xml
@@ -11,7 +11,7 @@
1.4.3
-
+ An object containing data that will be passed to the event handler.
diff --git a/entries/select.xml b/entries/select.xml
index 44e51043..597c0f1d 100644
--- a/entries/select.xml
+++ b/entries/select.xml
@@ -11,7 +11,7 @@
1.4.3
-
+ An object containing data that will be passed to the event handler.
diff --git a/entries/submit.xml b/entries/submit.xml
index 38ee1f06..28666420 100644
--- a/entries/submit.xml
+++ b/entries/submit.xml
@@ -11,7 +11,7 @@
1.4.3
-
+ An object containing data that will be passed to the event handler.
diff --git a/entries/unload.xml b/entries/unload.xml
index 9fc62283..e7c12492 100644
--- a/entries/unload.xml
+++ b/entries/unload.xml
@@ -10,7 +10,7 @@
1.4.3
-
+ A plain object of data that will be passed to the event handler.
From 500f05eccd7c5a48803db6dba19f592fef34cc36 Mon Sep 17 00:00:00 2001
From: Matt
Date: Thu, 28 Aug 2014 09:03:04 -0400
Subject: [PATCH 100/699] jQuery(): Document change in jQuery( html ) behavior
as of 1.9. Minor style fixes. Closes #531
---
entries/jQuery.xml | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/entries/jQuery.xml b/entries/jQuery.xml
index ad58d2c7..fc13219d 100644
--- a/entries/jQuery.xml
+++ b/entries/jQuery.xml
@@ -173,8 +173,8 @@ $( myForm.elements ).hide();
If a string is passed as the parameter to $(), jQuery examines the string to see if it looks like HTML (i.e., it starts with <tag ... >). If not, the string is interpreted as a selector expression, as explained above. But if the string appears to be an HTML snippet, jQuery attempts to create new DOM elements as described by the HTML. Then a jQuery object is created and returned that refers to these elements. You can perform any of the usual jQuery methods on this object:
For explicit parsing of a string to HTML, use the $.parseHTML() method.
-
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.
+
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.
To ensure cross-platform compatibility, the snippet must be well-formed. Tags that can contain other elements should be paired with a closing tag:
When passing HTML to jQuery(), please also note that text nodes are not treated as DOM elements. With the exception of a few methods (such as .content()), they are generally otherwise ignored or removed. E.g:
+
When passing HTML to jQuery(), note that text nodes are not treated as DOM elements. With the exception of a few methods (such as .content()), they are generally ignored or removed. E.g:
As of jQuery 1.4, the second argument to jQuery() can accept a plain object consisting of a superset of the properties that can be passed to the .attr() method.
-
Important: If the second argument is passed, the HTML string in the first argument must represent a a simple element with no attributes. As of jQuery 1.4, any event type can be passed in, and the following jQuery methods can be called: val, css, html, text, data, width, height, or offset.
+
This behavior is expected. As of jQuery 1.9.0 (and unless using the jQuery Migrate plugin), jQuery() requires the HTML string to start with a < (i.e text nodes cannot appear at the front of the HTML string).
+
As of jQuery 1.4, the second argument to jQuery() can accept a plain object consisting of a superset of the properties that can be passed to the .attr() method.
+
Important: If the second argument is passed, the HTML string in the first argument must represent a simple element with no attributes. As of jQuery 1.4, any event type can be passed in, and the following jQuery methods can be called: val, css, html, text, data, width, height, or offset.
As of jQuery 1.8, any jQuery instance method (a method of jQuery.fn) can be used as a property of the object passed to the second parameter:
$( "", {
From 1b41725878f0c5b3a0c1872204cb04c272799059 Mon Sep 17 00:00:00 2001
From: Karl Swedberg
Date: Thu, 28 Aug 2014 09:27:12 -0400
Subject: [PATCH 101/699] 1.11.18
---
package.json | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/package.json b/package.json
index 53e488d4..478553bd 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.11.17",
+ "version": "1.11.18",
"homepage": "https://github.com/jquery/api.jquery.com",
"author": {
"name": "jQuery Foundation (https://jquery.org/)"
From 44c1990c3a69a174f28a758a842a6ff8b24d414d Mon Sep 17 00:00:00 2001
From: Alex Monk
Date: Thu, 11 Sep 2014 15:02:37 -0500
Subject: [PATCH 102/699] Types page: Remove extra space from beginning of
'load' DOM event
---
pages/Types.html | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pages/Types.html b/pages/Types.html
index 3889f34f..e30e97e2 100644
--- a/pages/Types.html
+++ b/pages/Types.html
@@ -579,7 +579,7 @@
Event
Those properties are all documented, and accompanied by examples, on the Event object page.
-
The standard events in the Document Object Model are: blur, focus, load, resize, scroll, unload, beforeunload, click, dblclick, mousedown, mouseup, mousemove, mouseover, mouseout, mouseenter, mouseleave, change, select, submit, keydown, keypress, and keyup. Since the DOM event names have predefined meanings for some elements, using them for other purposes is not recommended. jQuery's event model can trigger an event by any name on an element, and it is propagated up the DOM tree to which that element belongs, if any.
+
The standard events in the Document Object Model are: blur, focus, load, resize, scroll, unload, beforeunload, click, dblclick, mousedown, mouseup, mousemove, mouseover, mouseout, mouseenter, mouseleave, change, select, submit, keydown, keypress, and keyup. Since the DOM event names have predefined meanings for some elements, using them for other purposes is not recommended. jQuery's event model can trigger an event by any name on an element, and it is propagated up the DOM tree to which that element belongs, if any.
Element
An element in the Document Object Model (DOM) can have attributes, text, and children. It provides methods to traverse the parent and children and to get access to its attributes. Due to inconsistencies in DOM API specifications and implementations, however, those methods can be a challenge to use. jQuery provides a "wrapper" around those elements to help interacting with the DOM. But sometimes you will be working directly with DOM elements, or see methods that (also) accept DOM elements as arguments.
From 8592feba7790c8b6195298192f00f119fdeb3dc0 Mon Sep 17 00:00:00 2001
From: Matt
Date: Thu, 11 Sep 2014 15:37:06 -0500
Subject: [PATCH 103/699] jQuery.when(): Clarify multiple deferred behavior and
provide example. Closes #545
---
entries/jQuery.when.xml | 36 ++++++++++++++++++++++++++++++++----
1 file changed, 32 insertions(+), 4 deletions(-)
diff --git a/entries/jQuery.when.xml b/entries/jQuery.when.xml
index 3a147ab2..e28819e3 100644
--- a/entries/jQuery.when.xml
+++ b/entries/jQuery.when.xml
@@ -9,20 +9,48 @@
Provides a way to execute callback functions based on one or more objects, usually Deferred objects that represent asynchronous events.
-
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 and can be used this way:
+
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 and can be used this way:
If a single argument is passed to jQuery.when and it is not a Deferred or a Promise, it will be treated as a resolved Deferred and any doneCallbacks attached will be executed immediately. The doneCallbacks are passed the original argument. In this case any failCallbacks you might set are never called since the Deferred is never rejected. For example:
+
If a single argument is passed to jQuery.when() and it is not a Deferred or a Promise, it will be treated as a resolved Deferred and any doneCallbacks attached will be executed immediately. The doneCallbacks are passed the original argument. In this case any failCallbacks you might set are never called since the Deferred is never rejected. For example:
In the case where multiple Deferred objects are passed to jQuery.when, the method returns the Promise from a new "master" Deferred object that tracks the aggregate state of all the Deferreds it has been passed. The method will resolve its master Deferred as soon as all the Deferreds resolve, or reject the master Deferred as soon as one of the Deferreds is rejected. If the master Deferred is resolved, it is passed the resolved values of all the Deferreds that were passed to jQuery.when. For example, when the Deferreds are jQuery.ajax() requests, the arguments will be the jqXHR objects for the requests, in the order they were given in the argument list.
-
In the multiple-Deferreds case where one of the Deferreds is rejected, jQuery.when immediately fires the failCallbacks for its master Deferred. Note that some of the Deferreds may still be unresolved at that point. If you need to perform additional processing for this case, such as canceling any unfinished ajax requests, you can keep references to the underlying jqXHR objects in a closure and inspect/cancel them in the failCallback.
+
In the case where multiple Deferred objects are passed to jQuery.when(), the method returns the Promise from a new "master" Deferred object that tracks the aggregate state of all the Deferreds it has been passed. The method will resolve its master Deferred as soon as all the Deferreds resolve, or reject the master Deferred as soon as one of the Deferreds is rejected. If the master Deferred is resolved, the doneCallbacks for the master Deferred are executed. The arguments passed to the doneCallbacks provide the resolved values for each of the Deferreds, and matches the order the Deferreds were passed to jQuery.when(). For example:
In the event a Deferred was resolved with no value, the corresponding doneCallback argument will be undefined. If a Deferred resolved to a single value, the corresponding argument will hold that value. In the case where a Deferred resolved to multiple values, the corresponding argument will be an array of those values. For example:
In the multiple-Deferreds case where one of the Deferreds is rejected, jQuery.when() immediately fires the failCallbacks for its master Deferred. Note that some of the Deferreds may still be unresolved at that point. The arguments passed to the failCallbacks match the signature of the failCallback for the Deferred that was rejected. If you need to perform additional processing for this case, such as canceling any unfinished ajax requests, you can keep references to the underlying jqXHR objects in a closure and inspect/cancel them in the failCallback.
Execute a function after two ajax requests are successful. (See the jQuery.ajax() documentation for a complete description of success and error cases for an ajax request).
From bb5a21d6215d229190182b52bd77ffc98d046e23 Mon Sep 17 00:00:00 2001
From: Matt
Date: Thu, 11 Sep 2014 15:59:02 -0500
Subject: [PATCH 104/699] Remove recommendation that removeData() is the same
as data("key", undefined). Closes #542.
---
entries/data.xml | 7 ++++---
entries/jQuery.data.xml | 7 ++++---
entries/removeData.xml | 9 ++++++---
notes.xsl | 9 ++++++---
4 files changed, 20 insertions(+), 12 deletions(-)
diff --git a/entries/data.xml b/entries/data.xml
index 560f49d5..67fa35be 100644
--- a/entries/data.xml
+++ b/entries/data.xml
@@ -8,8 +8,8 @@
A string naming the piece of data to set.
-
- The new data value; it can be any Javascript type including Array or Object.
+
+ The new data value; this can be any Javascript type except undefined.
@@ -30,10 +30,11 @@ $( "body" ).data( "foo" ); // 52
$( "body" ).data(); // { foo: 52, bar: { myType: "test", count: 40 }, baz: [ 1, 2, 3 ] }
In jQuery 1.4.3 setting an element's data object with .data(obj) extends the data previously stored with that element. jQuery itself uses the .data() method to save information under the names 'events' and 'handle', and also reserves any data name starting with an underscore ('_') for internal use.
-
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.
+
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.
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.
+ Store then retrieve a value from the div element.A string naming the piece of data to set.
-
- The new data value.
+
+ The new data value; this can be any Javascript type except undefined.Store arbitrary data associated with the specified element. Returns the value that was set.
@@ -23,8 +23,9 @@
jQuery.data( document.body, "foo", 52 );
jQuery.data( document.body, "bar", "test" );
-
Note: this method currently does not provide cross-platform support for setting data on XML documents, as Internet Explorer does not allow data to be attached via expando properties.
+
+ Store then retrieve a value from the div element.Remove a previously-stored piece of data.
-
The .removeData() method allows us to remove values that were previously set using .data(). When called with the name of a key, .removeData() deletes that particular value; when called with no arguments, all values are removed. Removing data from jQuery's internal .data() cache does not affect any HTML5 data- attributes in a document; use .removeAttr() to remove those.
-
When using .removeData("name"), jQuery will attempt to locate a data- attribute on the element if no property by that name is in the internal data cache. To avoid a re-query of the data- attribute, set the name to a value of either null or undefined (e.g. .data("name", undefined)) rather than using .removeData().
+
The .removeData() method allows us to remove values that were previously set using .data(). When called with the name of a key, .removeData() deletes that particular value. When called with no arguments, .removeData() removes all values.
+
+ Note that .removeData() will only remove data from jQuery's internal .data() cache, and any corresponding data- attributes on the element will not be removed. A later call to data()
+ will therefore re-retrieve the value from the data- attribute. To prevent this, use .removeAttr() alongside .removeData() to remove the data- attribute as well. Prior to jQuery 1.4.3,
+ as data() did not use data- attributes, this was not an issue.
+
As of jQuery 1.7, when called with an array of keys or a string of space-separated keys, .removeData() deletes the value of each key in that array or string.
-
As of jQuery 1.4.3, calling .removeData() will cause the value of the property being removed to revert to the value of the data attribute of the same name in the DOM, rather than being set to undefined.
Set a data store for 2 names then remove one of them.
diff --git a/notes.xsl b/notes.xsl
index 6d4ed1fb..7c1c0c9a 100644
--- a/notes.xsl
+++ b/notes.xsl
@@ -1,15 +1,15 @@
+
+ undefined is not recognised as a data value. Calls such as ( , undefined ) will return the corresponding data for "name", and is therefore the same as ( ).
+
The numbers returned by dimensions-related APIs, including , may be fractional in some cases. Code should not assume it is an integer. Also, dimensions may be incorrect when the page is zoomed by the user; browsers do not expose an API to detect this condition.
Prior to jQuery 1.9, would attempt to add or change nodes in the current jQuery set if the first node in the set was not connected to a document, and in those cases return a new jQuery set rather than the original set. The method might or might not have returned a new result depending on the number or connectedness of its arguments! As of jQuery 1.9, .after(), .before(), and .replaceWith() always return the original unmodified set. Attempting to use these methods on a node without a parent has no effect—that is, neither the set nor the nodes it contains are changed.
-
- The method removes all data and event handlers associated with the removed nodes.
-
Selected elements are in the order of their appearance in the document.
@@ -34,6 +34,9 @@
Since the .live() method handles events once they have propagated to the top of the document, it is not possible to stop propagation of live events. Similarly, events handled by .delegate() will propagate to the elements to which they are delegated; event handlers bound on any elements below it in the DOM tree will already have been executed by the time the delegated event handler is called. These handlers, therefore, may prevent the delegated handler from triggering by calling event.stopPropagation() or returning false.
+
+ The method removes all data and event handlers associated with the removed nodes.
+
Due to browser security restrictions, most "Ajax" requests are subject to the same origin policy; the request can not successfully retrieve data from a different domain, subdomain, port, or protocol.
From 9bf9b1f98402081bd3d1fcfd7e71fa0deaeb120b Mon Sep 17 00:00:00 2001
From: Matt
Date: Thu, 11 Sep 2014 16:06:37 -0500
Subject: [PATCH 105/699] Dimensions methods: Note that various height/width
methods may return inaccurate value if parent is hidden. Fixes #469. Closes
#544.
---
entries/height.xml | 5 +++--
entries/innerHeight.xml | 1 +
entries/innerWidth.xml | 1 +
entries/outerHeight.xml | 1 +
entries/outerWidth.xml | 1 +
entries/width.xml | 9 +++++----
notes.xsl | 5 ++++-
7 files changed, 16 insertions(+), 7 deletions(-)
diff --git a/entries/height.xml b/entries/height.xml
index 8808ac6c..9d4b86bc 100644
--- a/entries/height.xml
+++ b/entries/height.xml
@@ -25,7 +25,8 @@ $( document ).height();
Note: Although style and script tags will report a value for .width() or height() when absolutely positioned and given display:block, it is strongly discouraged to call those methods on these tags. In addition to being a bad practice, the results may also prove unreliable.
-
+
+ Show various heights. Note the values are from the iframe so might be smaller than you expected. The yellow highlight shows the iframe body.
-
+ A function returning the height to set. Receives the index position of the element in the set and the old height as arguments. Within the function, this refers to the current element in the set.
diff --git a/entries/innerHeight.xml b/entries/innerHeight.xml
index cf9bb667..6b689d47 100644
--- a/entries/innerHeight.xml
+++ b/entries/innerHeight.xml
@@ -16,6 +16,7 @@
+ Get the innerHeight of a paragraph.
+ Get the innerWidth of a paragraph.
+ Get the outerHeight of a paragraph.
+ Get the outerWidth of a paragraph.Note: Although style and script tags will report a value for .width() or height() when absolutely positioned and given display:block, it is strongly discouraged to call those methods on these tags. In addition to being a bad practice, the results may also prove unreliable.
-
+
+ Show various widths. Note the values are from the iframe so might be smaller than you expected. The yellow highlight shows the iframe body.1.4.1
-
+
-
-
+
+
A function returning the width to set. Receives the index position of the element in the set and the old width as arguments. Within the function, this refers to the current element in the set.
diff --git a/notes.xsl b/notes.xsl
index 7c1c0c9a..756cedf7 100644
--- a/notes.xsl
+++ b/notes.xsl
@@ -5,7 +5,7 @@
undefined is not recognised as a data value. Calls such as ( , undefined ) will return the corresponding data for "name", and is therefore the same as ( ).
- The numbers returned by dimensions-related APIs, including , may be fractional in some cases. Code should not assume it is an integer. Also, dimensions may be incorrect when the page is zoomed by the user; browsers do not expose an API to detect this condition.
+ The number returned by dimensions-related APIs, including , may be fractional in some cases. Code should not assume it is an integer. Also, dimensions may be incorrect when the page is zoomed by the user; browsers do not expose an API to detect this condition.
Prior to jQuery 1.9, would attempt to add or change nodes in the current jQuery set if the first node in the set was not connected to a document, and in those cases return a new jQuery set rather than the original set. The method might or might not have returned a new result depending on the number or connectedness of its arguments! As of jQuery 1.9, .after(), .before(), and .replaceWith() always return the original unmodified set. Attempting to use these methods on a node without a parent has no effect—that is, neither the set nor the nodes it contains are changed.
@@ -16,6 +16,9 @@
Forms and their child elements should not use input names or ids that conflict with properties of a form, such as submit, length, or method. Name conflicts can cause confusing failures. For a complete list of rules and to check your markup for these problems, see DOMLint.
+
+ The value reported by is not guaranteed to be accurate when the element's parent is hidden. To get an accurate value, you should show the parent first, before using .
+
Because is a jQuery extension and not part of the CSS specification, queries using cannot take advantage of the performance boost provided by the native DOM querySelectorAll() method. To achieve the best performance when using to select elements, first select the elements using a pure CSS selector, then use .filter("").
From a607d538976c90bf197bfb25f329c72a60d8a1cb Mon Sep 17 00:00:00 2001
From: Richard Gibson
Date: Thu, 11 Sep 2014 16:19:15 -0500
Subject: [PATCH 106/699] serializeArray(): Improve description of valid input
elements. Ref jQuery #15191. Closes #536.
---
entries/serializeArray.xml | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/entries/serializeArray.xml b/entries/serializeArray.xml
index a86f1373..bc46e920 100644
--- a/entries/serializeArray.xml
+++ b/entries/serializeArray.xml
@@ -6,7 +6,7 @@
Encode a set of form elements as an array of names and values.
-
The .serializeArray() method creates a JavaScript array of objects, ready to be encoded as a JSON string. It operates on a jQuery object representing a set of form elements. The form elements can be of several types:
+
The .serializeArray() method creates a JavaScript array of objects, ready to be encoded as a JSON string. It operates on a jQuery collection of forms and/or form controls. The controls can be of several types:
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.
-
This method can act on a jQuery object that has selected individual form elements, such as <input>, <textarea>, and <select>. However, it is typically easier to select the <form> tag itself for serialization:
+
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 ) {
console.log( $( this ).serializeArray() );
From 8b84cc453e52a2b16c7c11642a2bba48693c35af Mon Sep 17 00:00:00 2001
From: Karl Swedberg
Date: Thu, 11 Sep 2014 16:27:00 -0500
Subject: [PATCH 107/699] 1.11.19
---
package.json | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/package.json b/package.json
index 478553bd..6a3fe702 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.11.18",
+ "version": "1.11.19",
"homepage": "https://github.com/jquery/api.jquery.com",
"author": {
"name": "jQuery Foundation (https://jquery.org/)"
From c2c633afcd8bd4704afcc951afb904e1cc473e9b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Scott=20Gonz=C3=A1lez?=
Date: Sat, 13 Sep 2014 14:17:17 -0500
Subject: [PATCH 108/699] Build: Upgrade to grunt-wordpress 1.1.0 and
grunt-jquery-content 0.12.1
---
package.json | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/package.json b/package.json
index 6a3fe702..f6960c5a 100644
--- a/package.json
+++ b/package.json
@@ -23,8 +23,8 @@
"dependencies": {
"grunt": "0.3.17",
"grunt-clean": "0.3.0",
- "grunt-wordpress": "1.0.7",
- "grunt-jquery-content": "0.12.0",
+ "grunt-wordpress": "1.1.0",
+ "grunt-jquery-content": "0.12.1",
"grunt-check-modules": "0.1.0"
},
"devDependencies": {},
From 95f96adc190342d32213cc5367c651bd261386a3 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Scott=20Gonz=C3=A1lez?=
Date: Sat, 13 Sep 2014 16:37:28 -0500
Subject: [PATCH 109/699] 1.11.20
---
package.json | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/package.json b/package.json
index f6960c5a..930b7619 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.11.19",
+ "version": "1.11.20",
"homepage": "https://github.com/jquery/api.jquery.com",
"author": {
"name": "jQuery Foundation (https://jquery.org/)"
From 8d5ed5bc77e86a31897d8e58fa1f3c26eb586bfb Mon Sep 17 00:00:00 2001
From: Matt
Date: Fri, 12 Sep 2014 09:25:56 -0500
Subject: [PATCH 110/699] on(): Document that on() accepts .trigger() args.
Fixes #472. Closes #538.
---
entries/on.xml | 31 +++++++++++++++++++++++++------
1 file changed, 25 insertions(+), 6 deletions(-)
diff --git a/entries/on.xml b/entries/on.xml
index a875aa37..eeab0009 100644
--- a/entries/on.xml
+++ b/entries/on.xml
@@ -16,6 +16,7 @@
A function to execute when the event is triggered. The value false is also allowed as a shorthand for a function that simply does return false.
+
@@ -63,7 +64,7 @@ function notify() {
}
$( "button" ).on( "click", notify );
-
When the browser triggers an event or other JavaScript calls jQuery's .trigger() method, jQuery passes the handler an event object it can use to analyze and change the status of the event. This object is a normalized subset of data provided by the browser; the browser's unmodified native event object is available in event.originalEvent. For example, event.type contains the event name (e.g., "resize") and event.target indicates the deepest (innermost) element where the event occurred.
+
When the browser triggers an event or other JavaScript calls jQuery's .trigger() method, jQuery passes the handler an Event object it can use to analyze and change the status of the event. This object is a normalized subset of data provided by the browser; the browser's unmodified native event object is available in event.originalEvent. For example, event.type contains the event name (e.g., "resize") and event.target indicates the deepest (innermost) element where the event occurred.
By default, most events bubble up from the original event target to the document element. At each element along the way, jQuery calls any matching event handlers that have been attached. A handler can prevent the event from bubbling further up the document tree (and thus prevent handlers on those elements from running) by calling event.stopPropagation(). Any other handlers attached on the current element will run however. To prevent that, call event.stopImmediatePropagation(). (Event handlers bound to an element are called in the same order that they were bound.)
Similarly, a handler can call event.preventDefault() to cancel any default action that the browser may have for this event; for example, the default action on a click event is to follow the link. Not all browser events have default actions, and not all default actions can be canceled. See the W3C Events Specification for details.
Returning false from an event handler will automatically call event.stopPropagation() and event.preventDefault(). A false value can also be passed for the handler as a shorthand for function(){ return false; }. So, $( "a.disabled" ).on( "click", false ); attaches an event handler to all links with class "disabled" that prevents them from being followed when they are clicked and also stops the event from bubbling.
The above code will generate two different alerts when the button is clicked.
-
As an alternative or in addition to the data argument provided to the .on() method, you can also pass data to an event handler using a second argument to .trigger() or .triggerHandler().
+
As an alternative or in addition to the data argument provided to the .on() method, you can also pass data to an event handler using a second argument to .trigger() or .triggerHandler(). Data provided this way is passed to the event handler as further parameters after the Event object. If an array was passed to the second argument of .trigger() or .triggerHandler(), each element in the array will be presented to the event handler as an individual parameter.
Event performance
In most cases, an event such as click occurs infrequently and performance is not a significant concern. However, high frequency events such as mousemove or scroll can fire dozens of times per second, and in those cases it becomes more important to use events judiciously. Performance can be increased by reducing the amount of work done in the handler itself, caching information needed by the handler rather than recalculating it, or by rate-limiting the number of actual page updates using setTimeout.
Attaching many delegated event handlers near the top of the document tree can degrade performance. Each time the event occurs, jQuery must compare all selectors of all attached events of that type to every element in the path from the event target up to the top of the document. For best performance, attach delegated events at a document location as close as possible to the target elements. Avoid excessive use of document or document.body for delegated events on large documents.
@@ -120,7 +121,7 @@ $( "form" ).on( "submit", false );
]]>
- Cancel only the default action by using .preventDefault().
+ Cancel only the default action by using .preventDefault().
- Stop submit events from bubbling without preventing form submit, using .stopPropagation().
+ Stop submit events from bubbling without preventing form submit, using .stopPropagation().
+
+
+ Pass data to the event handler using the second argument to .trigger()
+
+
+
+ Use the the second argument of .trigger() to pass an array of data to the event handler
+
@@ -196,7 +215,7 @@ $( "div.test" ).on({
]]>
- Click any paragraph to add another after it. Note that .on() allows a click event on any paragraph--even new ones--since the event is handled by the ever-present body element after it bubbles to there.
+ Click any paragraph to add another after it. Note that .on() allows a click event on any paragraph--even new ones--since the event is handled by the ever-present body element after it bubbles to there.
- Cancel a link's default action using the preventDefault method.
+ Cancel a link's default action using the .preventDefault() method.
Date: Wed, 24 Sep 2014 14:56:35 -0400
Subject: [PATCH 111/699] Add missing removed category slugs. Closes gh-557
---
entries/deferred.isRejected.xml | 1 +
entries/deferred.isResolved.xml | 1 +
entries/selector.xml | 1 +
3 files changed, 3 insertions(+)
diff --git a/entries/deferred.isRejected.xml b/entries/deferred.isRejected.xml
index ebf93473..5fdd1e95 100644
--- a/entries/deferred.isRejected.xml
+++ b/entries/deferred.isRejected.xml
@@ -13,4 +13,5 @@
+
diff --git a/entries/deferred.isResolved.xml b/entries/deferred.isResolved.xml
index fa1a9392..b5941322 100644
--- a/entries/deferred.isResolved.xml
+++ b/entries/deferred.isResolved.xml
@@ -13,4 +13,5 @@
+
diff --git a/entries/selector.xml b/entries/selector.xml
index 74ea2326..971a2535 100644
--- a/entries/selector.xml
+++ b/entries/selector.xml
@@ -12,4 +12,5 @@
+
From 9cf8d5f5ba537bb461d94659753097a07f4d18ad Mon Sep 17 00:00:00 2001
From: Karl Swedberg
Date: Wed, 24 Sep 2014 15:01:56 -0400
Subject: [PATCH 112/699] 1.11.21
---
package.json | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/package.json b/package.json
index 930b7619..d1152a05 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.11.20",
+ "version": "1.11.21",
"homepage": "https://github.com/jquery/api.jquery.com",
"author": {
"name": "jQuery Foundation (https://jquery.org/)"
From 21cc6b608b3c22349cc57a5cac5ae418ea6fda4e Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Scott=20Gonz=C3=A1lez?=
Date: Tue, 30 Sep 2014 15:02:50 -0400
Subject: [PATCH 113/699] Build: Upgrade to grunt-wordpress 1.2.1 and
grunt-jquery-content 0.13.0
---
package.json | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/package.json b/package.json
index d1152a05..ca70c3a8 100644
--- a/package.json
+++ b/package.json
@@ -23,8 +23,8 @@
"dependencies": {
"grunt": "0.3.17",
"grunt-clean": "0.3.0",
- "grunt-wordpress": "1.1.0",
- "grunt-jquery-content": "0.12.1",
+ "grunt-wordpress": "1.2.1",
+ "grunt-jquery-content": "0.13.0",
"grunt-check-modules": "0.1.0"
},
"devDependencies": {},
From ae9390d2185b6ef0a53032af8aa4911719878d64 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Scott=20Gonz=C3=A1lez?=
Date: Tue, 30 Sep 2014 15:06:01 -0400
Subject: [PATCH 114/699] 1.11.22
---
package.json | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/package.json b/package.json
index ca70c3a8..1b998f3f 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.11.21",
+ "version": "1.11.22",
"homepage": "https://github.com/jquery/api.jquery.com",
"author": {
"name": "jQuery Foundation (https://jquery.org/)"
From f9b6ff0fa5e1bba629dc38b39aeb1cd09b49cb5a Mon Sep 17 00:00:00 2001
From: Steve Clay
Date: Tue, 30 Sep 2014 14:33:41 -0400
Subject: [PATCH 115/699] add: Make it more obvious that add() doesn't mutate
Fixes gh-565
Closes gh-566
---
entries/add.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/entries/add.xml b/entries/add.xml
index 1bd30426..04b4a3bc 100644
--- a/entries/add.xml
+++ b/entries/add.xml
@@ -34,7 +34,7 @@
The point in the document at which the selector should begin matching; similar to the context argument of the $(selector, context) method.
- Add elements to the set of matched elements.
+ Create a new jQuery object with elements added to the set of matched elements.
Given a jQuery object that represents a set of DOM elements, the .add() method constructs a new jQuery object from the union of those elements and the ones passed into the method. The argument to .add() can be pretty much anything that $() accepts, including a jQuery selector expression, references to DOM elements, or an HTML snippet.
Do not assume that this method appends the elements to the existing collection in the order they are passed to the .add() method. When all elements are members of the same document, the resulting collection from .add() will be sorted in document order; that is, in order of each element's appearance in the document. If the collection consists of elements from different documents or ones not in any document, the sort order is undefined. To create a jQuery object with elements in a well-defined order and without sorting overhead, use the $(array_of_DOM_elements) signature.
From 72035197dcd1fc10004f556919a296b806546f1a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Scott=20Gonz=C3=A1lez?=
Date: Wed, 1 Oct 2014 08:04:07 -0400
Subject: [PATCH 116/699] 1.11.23
---
package.json | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/package.json b/package.json
index 1b998f3f..31fe4466 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.11.22",
+ "version": "1.11.23",
"homepage": "https://github.com/jquery/api.jquery.com",
"author": {
"name": "jQuery Foundation (https://jquery.org/)"
From 4b2558184e561cc9bd7bb817cd4720e4dbaef02f Mon Sep 17 00:00:00 2001
From: Aurelio De Rosa
Date: Fri, 3 Oct 2014 08:44:38 -0400
Subject: [PATCH 117/699] jQuery.each(): Add note about length prop in objects.
* Fixes #473. Closes #527.
---
entries/jQuery.each.xml | 1 +
1 file changed, 1 insertion(+)
diff --git a/entries/jQuery.each.xml b/entries/jQuery.each.xml
index f8ab8a64..67fe70cc 100644
--- a/entries/jQuery.each.xml
+++ b/entries/jQuery.each.xml
@@ -26,6 +26,7 @@
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.
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 syntaxincluding 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).
+
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 syntaxincluding 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:
var mydata = $( "#mydiv" ).data();
From 4d5f1fca836a941d7eac1ceb7355409919ba7df2 Mon Sep 17 00:00:00 2001
From: Karl Swedberg
Date: Fri, 3 Oct 2014 08:53:15 -0400
Subject: [PATCH 119/699] 1.11.24
---
package.json | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/package.json b/package.json
index 31fe4466..647df5a9 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.11.23",
+ "version": "1.11.24",
"homepage": "https://github.com/jquery/api.jquery.com",
"author": {
"name": "jQuery Foundation (https://jquery.org/)"
From ad3e554b097253e4acbca3db1dc2db5b97544472 Mon Sep 17 00:00:00 2001
From: Usman Akeju
Date: Fri, 3 Oct 2014 10:20:53 -0400
Subject: [PATCH 120/699] jQuery.support(): Mark as deprecated as of version
1.9
---
categories.xml | 5 +++++
entries/jQuery.support.xml | 3 ++-
2 files changed, 7 insertions(+), 1 deletion(-)
diff --git a/categories.xml b/categories.xml
index 8db3b46b..40a34dd9 100644
--- a/categories.xml
+++ b/categories.xml
@@ -56,6 +56,11 @@
]]>
+
+ For more information, see the Release Notes/Changelog at http://blog.jquery.com/2013/01/15/jquery-1-9-final-jquery-2-0-beta-migrate-final-released/
+ ]]>
+ For more information, see the Release Notes/Changelog at http://blog.jquery.com/2013/05/24/jquery-1-10-0-and-2-0-1-released/
diff --git a/entries/jQuery.support.xml b/entries/jQuery.support.xml
index e04634c9..c44b2b42 100644
--- a/entries/jQuery.support.xml
+++ b/entries/jQuery.support.xml
@@ -1,5 +1,5 @@
-
+jQuery.support1.3
@@ -9,4 +9,5 @@
+
From 54f299f883e03740b138a4ffe481329955b9be9b Mon Sep 17 00:00:00 2001
From: Karl Swedberg
Date: Fri, 3 Oct 2014 10:21:12 -0400
Subject: [PATCH 121/699] 1.11.25
---
package.json | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/package.json b/package.json
index 647df5a9..19334aca 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.11.24",
+ "version": "1.11.25",
"homepage": "https://github.com/jquery/api.jquery.com",
"author": {
"name": "jQuery Foundation (https://jquery.org/)"
From f838424dfcb88ad7724c0cb5b7060c06bde98158 Mon Sep 17 00:00:00 2001
From: Karl Swedberg
Date: Sun, 5 Oct 2014 21:57:26 -0400
Subject: [PATCH 122/699] jQuery.Deferred(): Change "Deferred-compatible" to
"Promise-compatible". Thanks @AurelioDeRosa. Fixes #567.
---
entries/jQuery.Deferred.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/entries/jQuery.Deferred.xml b/entries/jQuery.Deferred.xml
index 5bf4ca60..fa9455c0 100644
--- a/entries/jQuery.Deferred.xml
+++ b/entries/jQuery.Deferred.xml
@@ -25,7 +25,7 @@
In JavaScript it is common to invoke functions that optionally accept callbacks that are called within that function. For example, in versions prior to jQuery 1.5, asynchronous processes such as jQuery.ajax() accept callbacks to be invoked some time in the near-future upon success, error, and completion of the ajax request.
jQuery.Deferred() introduces several enhancements to the way callbacks are managed and invoked. In particular, jQuery.Deferred() provides flexible ways to provide multiple callbacks, and these callbacks can be invoked regardless of whether the original callback dispatch has already occurred. jQuery Deferred is based on the CommonJS Promises/A design.
One model for understanding Deferred is to think of it as a chain-aware function wrapper. The deferred.then(), deferred.always(), deferred.done(), and deferred.fail() methods specify the functions to be called and the deferred.resolve(args) or deferred.reject(args) methods "call" the functions with the arguments you supply. Once the Deferred has been resolved or rejected it stays in that state; a second call to deferred.resolve(), for example, is ignored. If more functions are added by deferred.then(), for example, after the Deferred is resolved, they are called immediately with the arguments previously provided.
-
In most cases where a jQuery API call returns a Deferred or Deferred-compatible object, such as jQuery.ajax() or jQuery.when(), you will only want to use the deferred.then(), deferred.done(), and deferred.fail() methods to add callbacks to the Deferred's queues. The internals of the API call or code that created the Deferred will invoke deferred.resolve() or deferred.reject() on the deferred at some point, causing the appropriate callbacks to run.
+
In most cases where a jQuery API call returns a Deferred or Promise-compatible object, such as jQuery.ajax() or jQuery.when(), you will only want to use the deferred.then(), deferred.done(), and deferred.fail() methods to add callbacks to the Deferred's queues. The internals of the API call or code that created the Deferred will invoke deferred.resolve() or deferred.reject() on the deferred at some point, causing the appropriate callbacks to run.
From 4b45436b4948a891f2a009d565dde7995c0dca27 Mon Sep 17 00:00:00 2001
From: Usman Akeju
Date: Mon, 6 Oct 2014 08:17:06 -0400
Subject: [PATCH 123/699] jQuery.parseJSON: Function has multiple return types,
not just Object. Closes #490
---
entries/jQuery.parseJSON.xml | 21 +++++++++++++++------
1 file changed, 15 insertions(+), 6 deletions(-)
diff --git a/entries/jQuery.parseJSON.xml b/entries/jQuery.parseJSON.xml
index 1f13da91..bc9dcc78 100644
--- a/entries/jQuery.parseJSON.xml
+++ b/entries/jQuery.parseJSON.xml
@@ -1,5 +1,10 @@
-
+
+
+
+
+
+ jQuery.parseJSON()1.4.1
@@ -7,16 +12,20 @@
The JSON string to parse.
- Takes a well-formed JSON string and returns the resulting JavaScript object.
+ Takes a well-formed JSON string and returns the resulting JavaScript value.
-
Passing in a malformed JSON string results in a JavaScript exception being thrown. For example, the following are all malformed JSON strings:
+
Passing in a malformed JSON string results in a JavaScript exception being thrown. For example, the following are all invalid JSON strings:
-
{test: 1} (test does not have double quotes around it).
-
{'test': 1} ('test' is using single quotes instead of double quotes).
+
"{test: 1}" (test does not have double quotes around it).
+
"{'test': 1}" ('test' is using single quotes instead of double quotes).
+
"'test'" ('test' is using single quotes instead of double quotes).
+
".1" (a number must start with a digit; "0.1" would be valid).
+
"undefined" (undefined cannot be represented in a JSON string; null, however, can be).
+
"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/.
-
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.
+
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.
Parse a JSON string.
From edbc98ab58a9c81643ee96768dcc64f42f4423e7 Mon Sep 17 00:00:00 2001
From: Usman Akeju
Date: Mon, 6 Oct 2014 08:54:26 -0400
Subject: [PATCH 124/699] jQuery.ajax: callback and signatures should use
Anything type. Closes #492
---
entries/jQuery.ajax.xml | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/entries/jQuery.ajax.xml b/entries/jQuery.ajax.xml
index fd4d1878..93e8aaaa 100644
--- a/entries/jQuery.ajax.xml
+++ b/entries/jQuery.ajax.xml
@@ -67,8 +67,8 @@ $.ajax({
-
- A function to be used to handle the raw response data of XMLHttpRequest.This is a pre-filtering function to sanitize the response. You should return the sanitized data. The function accepts two arguments: The raw data returned from the server and the 'dataType' parameter.
+
+ A function to be used to handle the raw response data of XMLHttpRequest. This is a pre-filtering function to sanitize the response. You should return the sanitized data. The function accepts two arguments: The raw data returned from the server and the 'dataType' parameter.The type of data that you're expecting back from the server. If none is specified, jQuery will try to infer it based on the MIME type of the response (an XML MIME type will yield XML, in 1.4 JSON will yield a JavaScript object, in 1.4 script will execute the script, and anything else will be returned as a string). The available types (and the result passed as the first argument to your success callback) are:
@@ -130,10 +130,10 @@ $.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; 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.
+ 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.
From 5f7fa2b79009cf4ef9ca4b736f63ee142c6c75b8 Mon Sep 17 00:00:00 2001
From: Karl Swedberg
Date: Mon, 6 Oct 2014 08:57:00 -0400
Subject: [PATCH 125/699] 1.11.26
---
package.json | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/package.json b/package.json
index 19334aca..f93bcb3f 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.11.25",
+ "version": "1.11.26",
"homepage": "https://github.com/jquery/api.jquery.com",
"author": {
"name": "jQuery Foundation (https://jquery.org/)"
From bdb9c9360e03edf4cfaf09cb25728933dbf6d90c Mon Sep 17 00:00:00 2001
From: Arthur Verschaeve
Date: Thu, 9 Oct 2014 21:45:24 +0200
Subject: [PATCH 126/699] README: Link to Github Issues instead of
bugs.jquery.com
Closes gh-571
---
README.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/README.md b/README.md
index 9c25bb24..e33d9099 100644
--- a/README.md
+++ b/README.md
@@ -1,6 +1,6 @@
## Referencing Bug Tracker Tickets
-* Pull requests for changes that were requested or recommended via the [jQuery Bug Tracker](http://bugs.jquery.com) should include a link back to the relevant ticket.
+* Pull requests for changes that were requested or recommended via the [jQuery Issue Tracker](https://github.com/jquery/jquery/issues) should include a link back to the relevant ticket.
## Building
From c21b7879e89e24673e9047371dc2d484b03976e8 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jo=CC=88rn=20Zaefferer?=
Date: Fri, 17 Oct 2014 12:11:04 -0400
Subject: [PATCH 127/699] Types: Add entry for QUnit's Assert type Ref
jquery/api.qunitjs.com#58
---
pages/Types.html | 2 ++
1 file changed, 2 insertions(+)
diff --git a/pages/Types.html b/pages/Types.html
index e30e97e2..4e49174b 100644
--- a/pages/Types.html
+++ b/pages/Types.html
@@ -639,3 +639,5 @@
Callbacks Object
A multi-purpose object that provides a powerful way to manage callback lists. It supports adding, removing, firing, and disabling callbacks. The Callbacks object is created and returned by the $.Callbacks function and subsequently returned by most of that function's methods.
XML Document
A document object created by the browser's XML DOM parser, usually from a string representing XML. XML documents have different semantics than HTML documents, but most of the traversing and manipulation methods provided by jQuery will work with them.
From 55cb98ca3d5cfca59728eb927596f24357a50bd5 Mon Sep 17 00:00:00 2001
From: Karl Swedberg
Date: Sat, 18 Oct 2014 12:27:25 -0400
Subject: [PATCH 128/699] has-attribute selector: Make use of ".one()" explicit
for example
---
entries/has-attribute-selector.xml | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/entries/has-attribute-selector.xml b/entries/has-attribute-selector.xml
index facceca4..1bd8b4d8 100644
--- a/entries/has-attribute-selector.xml
+++ b/entries/has-attribute-selector.xml
@@ -11,8 +11,10 @@
Selects elements that have the specified attribute, with any value.
- Bind a single click that adds the div id to its text.
+ Bind a single click to divs with an id that adds the id to the div's text.
Date: Sat, 18 Oct 2014 12:33:41 -0400
Subject: [PATCH 129/699] 1.11.27
---
package.json | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/package.json b/package.json
index f93bcb3f..b14fda16 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.11.26",
+ "version": "1.11.27",
"homepage": "https://github.com/jquery/api.jquery.com",
"author": {
"name": "jQuery Foundation (https://jquery.org/)"
From c881b2bf3fbcd462582d89423386ec137f910735 Mon Sep 17 00:00:00 2001
From: Mike Pennisi
Date: Wed, 29 Oct 2014 21:20:01 -0400
Subject: [PATCH 130/699] before(), after(): Document new callback signature
since jQuery version 1.10
Closes gh-580
---
entries/after.xml | 14 +++++++++++++-
entries/before.xml | 15 ++++++++++++++-
2 files changed, 27 insertions(+), 2 deletions(-)
diff --git a/entries/after.xml b/entries/after.xml
index 8e57cdac..f6c52bf4 100644
--- a/entries/after.xml
+++ b/entries/after.xml
@@ -23,13 +23,25 @@
A function that returns an HTML string, DOM element(s), or jQuery object to insert after each element in the set of matched elements. Receives the index position of the element in the set as an argument. Within the function, this refers to the current element in the set.
-
+
+
+ 1.10
+
+ A function that returns an HTML string, DOM element(s), or jQuery object to insert after each element in the set of matched elements. Receives the index position of the element in the set and the old HTML value of the element as arguments. Within the function, this refers to the current element in the set.
+
+
+
+
+
+
+
+ Insert content, specified by the parameter, after each element in the set of matched elements.
diff --git a/entries/before.xml b/entries/before.xml
index 7c2ebb7b..5d1bc1aa 100644
--- a/entries/before.xml
+++ b/entries/before.xml
@@ -22,7 +22,6 @@
1.4
-
@@ -31,6 +30,20 @@
A function that returns an HTML string, DOM element(s), or jQuery object to insert before each element in the set of matched elements. Receives the index position of the element in the set as an argument. Within the function, this refers to the current element in the set.
+
+
+ 1.10
+
+
+
+
+
+
+
+
+ A function that returns an HTML string, DOM element(s), or jQuery object to insert before each element in the set of matched elements. Receives the index position of the element in the set and the old HTML value of the element as arguments. Within the function, this refers to the current element in the set.
+
+ Insert content, specified by the parameter, before each element in the set of matched elements.
From 18285f27fd5a27e5bde93f55c7eb802b90e6b6bc Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jo=CC=88rn=20Zaefferer?=
Date: Wed, 29 Oct 2014 21:27:46 -0400
Subject: [PATCH 131/699] Types: Add assert to ToC
Closes gh-582
---
package.json | 2 +-
pages/Types.html | 1 +
2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/package.json b/package.json
index b14fda16..a2e9bf1c 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.11.27",
+ "version": "1.11.28",
"homepage": "https://github.com/jquery/api.jquery.com",
"author": {
"name": "jQuery Foundation (https://jquery.org/)"
diff --git a/pages/Types.html b/pages/Types.html
index 4e49174b..c2b9d219 100644
--- a/pages/Types.html
+++ b/pages/Types.html
@@ -94,6 +94,7 @@
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.
Advanced Options
-
The global option prevents handlers registered using .ajaxSend(), .ajaxError(), and similar methods from firing when this request would trigger them. This can be useful to, for example, suppress a loading indicator that was implemented with .ajaxSend() if the requests are frequent and brief. With cross-domain script and JSONP requests, the global option is automatically set to false. See the descriptions of these methods below for more details. See the descriptions of these methods below for more details.
+
The global option prevents handlers registered using .ajaxSend(), .ajaxError(), and similar methods from firing when this request would trigger them. This can be useful to, for example, suppress a loading indicator that was implemented with .ajaxSend() if the requests are frequent and brief. With cross-domain script and JSONP requests, the global option is automatically set to false. See the descriptions of these methods below for more details.
If the server performs HTTP authentication before providing a response, the user name and password pair can be sent via the username and password options.
Ajax requests are time-limited, so errors can be caught and handled to provide a better user experience. Request timeouts are usually either left at their default or set as a global default using $.ajaxSetup() rather than being overridden for specific requests with the timeout option.
By default, requests are always issued, but the browser may serve results out of its cache. To disallow use of the cached results, set cache to false. To cause the request to report failure if the asset has not been modified since the last request, set ifModified to true.
From 20095344621e719519c7943f1209ae33d53d600a Mon Sep 17 00:00:00 2001
From: phistuck
Date: Thu, 30 Oct 2014 08:56:28 -0400
Subject: [PATCH 134/699] .trigger(): invoking the on(event-type) property of
an object
note that calling .trigger(event-type) on an object invokes
the on(event-type) property of that object
Closes gh-509
---
entries/trigger.xml | 1 +
1 file changed, 1 insertion(+)
diff --git a/entries/trigger.xml b/entries/trigger.xml
index 6a1f1288..a377c0f5 100644
--- a/entries/trigger.xml
+++ b/entries/trigger.xml
@@ -45,6 +45,7 @@ $( "#foo").trigger( "custom", [ "Custom", "Event" ] );
Note the difference between the extra parameters passed here and the eventData parameter to the .on() method. Both are mechanisms for passing information to an event handler, but the extraParameters argument to .trigger() allows information to be determined at the time the event is triggered, while the eventData argument to .on() requires the information to be already computed at the time the handler is bound.
The .trigger() method can be used on jQuery collections that wrap plain JavaScript objects similar to a pub/sub mechanism; any event handlers bound to the object will be called when the event is triggered.
Note: For both plain objects and DOM objects other than window, if a triggered event name matches the name of a property on the object, jQuery will attempt to invoke the property as a method if no event handler calls event.preventDefault(). If this behavior is not desired, use .triggerHandler() instead.
+
Note: As with .triggerHandler(), when calling .trigger() with an event name matches the name of a property on the object, prefixed by on (e.g. triggering click on window that has a non null onclick method), jQuery will attempt to invoke that property as a method.
Clicks to button #2 also trigger a click for button #1.
From 98b2b386a6c861e800b45cae19fe1e3f04975ae5 Mon Sep 17 00:00:00 2001
From: Karl Swedberg
Date: Fri, 31 Oct 2014 10:05:13 -0400
Subject: [PATCH 135/699] 1.11.30
---
package.json | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/package.json b/package.json
index 1655c634..63e25860 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.11.29",
+ "version": "1.11.30",
"homepage": "https://github.com/jquery/api.jquery.com",
"author": {
"name": "jQuery Foundation (https://jquery.org/)"
From d70ba7556380e9a8090da0879e4c21b5837cfe44 Mon Sep 17 00:00:00 2001
From: Karl Swedberg
Date: Tue, 4 Nov 2014 08:13:25 -0500
Subject: [PATCH 136/699] after(): Remove section regarding disconnected DOM
nodes
Fixes gh-559
---
entries/after.xml | 21 +--------------------
1 file changed, 1 insertion(+), 20 deletions(-)
diff --git a/entries/after.xml b/entries/after.xml
index f6c52bf4..0fc251d3 100644
--- a/entries/after.xml
+++ b/entries/after.xml
@@ -26,7 +26,7 @@
-
+
@@ -80,25 +80,6 @@ $( ".container" ).after( $( "h2" ) );
<h2>Greetings</h2>
Important: If there is more than one target element, however, cloned copies of the inserted element will be created for each target except for the last one.
-
Inserting Disconnected DOM nodes
-
As of jQuery 1.4, .before() and .after() will also work on disconnected DOM nodes. For example, given the following code:
-
$( "<div></div>" ).after( "<p></p>" );
-
The result is a jQuery set containing a div and a paragraph, in that order. That set can be further manipulated, even before it is inserted in the document.
As of jQuery 1.4, .after() supports passing a function that returns the elements to insert.
From 8b4faabb8445debc34d0dc9fc973f3df133812e8 Mon Sep 17 00:00:00 2001
From: Karl Swedberg
Date: Tue, 4 Nov 2014 08:51:39 -0500
Subject: [PATCH 137/699] after(): Improve first paragraph of long description
---
entries/after.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/entries/after.xml b/entries/after.xml
index 0fc251d3..1e195510 100644
--- a/entries/after.xml
+++ b/entries/after.xml
@@ -45,7 +45,7 @@
Insert content, specified by the parameter, after each element in the set of matched elements.
-
The .after() and .insertAfter() methods perform the same task. The major difference is in the syntax—specifically, in the placement of the content and target. With .after(), the selector expression preceding the method is the container after which the content is inserted. With .insertAfter(), on the other hand, the content precedes the method, either as a selector expression or as markup created on the fly, and it is inserted after the target container.
+
The .after() and .insertAfter() methods perform the same task. The major difference is in the syntax—specifically, in the placement of the content and target. With .after(), the content to be inserted comes from the method's argument: $(target).after(contentToBeInserted). With .insertAfter(), on the other hand, the content precedes the method and is inserted after the target, which in turn is passed as the .insertAfter() method's argument: $(contentToBeInserted).insertAfter(target).
Using the following HTML:
<div class="container">
From 76a2669570bea9bf10473afc6c1503d6432a0f96 Mon Sep 17 00:00:00 2001
From: Karl Swedberg
Date: Tue, 4 Nov 2014 09:19:58 -0500
Subject: [PATCH 138/699] before(): Remove note about disconnected DOM nodes
and improve some wording.
Refs gh-559
---
entries/before.xml | 11 +++--------
1 file changed, 3 insertions(+), 8 deletions(-)
diff --git a/entries/before.xml b/entries/before.xml
index 5d1bc1aa..cba817a9 100644
--- a/entries/before.xml
+++ b/entries/before.xml
@@ -25,8 +25,8 @@
-
-
+
+
A function that returns an HTML string, DOM element(s), or jQuery object to insert before each element in the set of matched elements. Receives the index position of the element in the set as an argument. Within the function, this refers to the current element in the set.
@@ -47,7 +47,7 @@
Insert content, specified by the parameter, before each element in the set of matched elements.
-
The .before() and .insertBefore() methods perform the same task. The major difference is in the syntax-specifically, in the placement of the content and target. With .before(), the selector expression preceding the method is the container before which the content is inserted. With .insertBefore(), on the other hand, the content precedes the method, either as a selector expression or as markup created on the fly, and it is inserted before the target container.
+
The .before() and .insertBefore() methods perform the same task. The major difference is in the syntax—specifically, in the placement of the content and target. With .before(), the content to be inserted comes from the method's argument: $(target).before(contentToBeInserted). With .insertBefore(), on the other hand, the content precedes the method and is inserted before the target, which in turn is passed as the .insertBefore() method's argument: $(contentToBeInserted).insertBefore(target).
Important: If there is more than one target element, however, cloned copies of the inserted element will be created for each target except for the last one.
-
In jQuery 1.4, .before() and .after() will also work on disconnected DOM nodes:
-
-$( "<div>" ).before( "<p></p>" );
-
-
The result is a jQuery set that contains a paragraph and a div (in that order).
Additional Arguments
Similar to other content-adding methods such as .prepend() and .after(), .before() also supports passing in multiple arguments as input. Supported input includes DOM elements, jQuery objects, HTML strings, and arrays of DOM elements.
For example, the following will insert two new <div>s and an existing <div> before the first paragraph:
From ced7160e8500b750b54500b0b6f91f9f1dd3e269 Mon Sep 17 00:00:00 2001
From: Karl Swedberg
Date: Tue, 4 Nov 2014 09:23:14 -0500
Subject: [PATCH 139/699] 1.11.31
---
package.json | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/package.json b/package.json
index 63e25860..adda6fa7 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.11.30",
+ "version": "1.11.31",
"homepage": "https://github.com/jquery/api.jquery.com",
"author": {
"name": "jQuery Foundation (https://jquery.org/)"
From f9531d8233b465657dc85998dc1951e93faa79c7 Mon Sep 17 00:00:00 2001
From: Corey Frang
Date: Thu, 6 Nov 2014 08:20:41 -0500
Subject: [PATCH 140/699] jQuery.getScript: Fix external link to jquery-color.
Point the link to the file on code.jquery.com, not GitHub.
Fixes #583.
---
entries/jQuery.getScript.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/entries/jQuery.getScript.xml b/entries/jQuery.getScript.xml
index 488b4525..7579f713 100644
--- a/entries/jQuery.getScript.xml
+++ b/entries/jQuery.getScript.xml
@@ -94,7 +94,7 @@ $.cachedScript( "ajax/test.js" ).done(function( script, textStatus ) {
Load the official jQuery Color Animation plugin dynamically and bind some color animations to occur once the new functionality is loaded.
Date: Thu, 6 Nov 2014 08:27:35 -0500
Subject: [PATCH 141/699] 1.11.32
---
package.json | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/package.json b/package.json
index adda6fa7..bc2cec1d 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.11.31",
+ "version": "1.11.32",
"homepage": "https://github.com/jquery/api.jquery.com",
"author": {
"name": "jQuery Foundation (https://jquery.org/)"
From 845a44268a666b863e60362faf6e175eea4a8ec5 Mon Sep 17 00:00:00 2001
From: Karl Swedberg
Date: Thu, 6 Nov 2014 11:42:08 -0500
Subject: [PATCH 142/699] jQuery.getScript: Change jquery-color script
reference to latest stable.
Refs gh-583
Refs gh-584
---
entries/jQuery.getScript.xml | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/entries/jQuery.getScript.xml b/entries/jQuery.getScript.xml
index 7579f713..d942a51c 100644
--- a/entries/jQuery.getScript.xml
+++ b/entries/jQuery.getScript.xml
@@ -9,7 +9,7 @@
-
+ A callback function that is executed if the request succeeds.
@@ -94,7 +94,7 @@ $.cachedScript( "ajax/test.js" ).done(function( script, textStatus ) {
Load the official jQuery Color Animation plugin dynamically and bind some color animations to occur once the new functionality is loaded.
Date: Thu, 6 Nov 2014 11:43:06 -0500
Subject: [PATCH 143/699] 1.11.33
---
package.json | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/package.json b/package.json
index bc2cec1d..9d0f1cb0 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.11.32",
+ "version": "1.11.33",
"homepage": "https://github.com/jquery/api.jquery.com",
"author": {
"name": "jQuery Foundation (https://jquery.org/)"
From 421f9f99ab8dd4565b966fc9a389cf5b710fd488 Mon Sep 17 00:00:00 2001
From: Dave Methvin
Date: Thu, 13 Nov 2014 22:11:07 -0500
Subject: [PATCH 144/699] Remove prevValue from copied properties
prevValue was never copied, not sure how it got onto this list.
---
categories.xml | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/categories.xml b/categories.xml
index 40a34dd9..d89d5580 100644
--- a/categories.xml
+++ b/categories.xml
@@ -143,7 +143,7 @@ jQuery( "body" ).trigger( e );
The following properties are also copied to the event object, though some of their values may be undefined depending on the event:
]]>
-
+ p
Aspects of the API that were changed in the corresponding version of jQuery. Changes in jQuery 1.9 dealt primarily removal or modification of several APIs that behaved inconsistently or inefficiently in the past. A jQuery Migrate Plugin was offered to help developers with a transitional upgrade path.
From e0e513e6b86bf3991ccdfef17ee7b6602aed2a92 Mon Sep 17 00:00:00 2001
From: Dave Methvin
Date: Thu, 13 Nov 2014 22:13:16 -0500
Subject: [PATCH 145/699] Remove extraneous character
---
categories.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/categories.xml b/categories.xml
index d89d5580..d4941b0e 100644
--- a/categories.xml
+++ b/categories.xml
@@ -406,7 +406,7 @@ jQuery.event.props.push( "dataTransfer" );
]]>
- p
+
Aspects of the API that were changed in the corresponding version of jQuery. Changes in jQuery 1.9 dealt primarily removal or modification of several APIs that behaved inconsistently or inefficiently in the past. A jQuery Migrate Plugin was offered to help developers with a transitional upgrade path.
From 1d26e2a594fdb1a3e66e689a08ab706043d2396b Mon Sep 17 00:00:00 2001
From: antishok
Date: Fri, 14 Nov 2014 08:36:38 -0500
Subject: [PATCH 146/699] jQuery.getScript: Remove random code sample.
Closes gh-588.
---
entries/jQuery.getScript.xml | 3 ---
1 file changed, 3 deletions(-)
diff --git a/entries/jQuery.getScript.xml b/entries/jQuery.getScript.xml
index d942a51c..e36d021c 100644
--- a/entries/jQuery.getScript.xml
+++ b/entries/jQuery.getScript.xml
@@ -28,9 +28,6 @@ $.ajax({
Success Callback
The callback is fired once the script has been loaded but not necessarily executed.
-
-$( ".result" ).html( "<p>Lorem ipsum dolor sit amet.</p>" );
-
Scripts are included and run by referencing the file name:
$.getScript( "ajax/test.js", function( data, textStatus, jqxhr ) {
From 5c84fb5c49731dab4c1cf6a45a6b9a167f0a9895 Mon Sep 17 00:00:00 2001
From: Chris Rebert
Date: Sat, 15 Nov 2014 11:42:04 -0500
Subject: [PATCH 147/699] :text selector: Clarify that it is for s, not
DOM text nodes
Closes gh-587
---
entries/text-selector.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/entries/text-selector.xml b/entries/text-selector.xml
index b6fbb228..9af4dc44 100644
--- a/entries/text-selector.xml
+++ b/entries/text-selector.xml
@@ -5,7 +5,7 @@
1.0
- Selects all elements of type text.
+ Selects all input elements of type text.
$( ":text" ) allows us to select all <input type="text"> elements. As with other pseudo-class selectors (those that begin with a ":") it is recommended to precede it with a tag name or some other selector; otherwise, the universal selector ( "*" ) is implied. In other words, the bare $( ":text" ) is equivalent to $( "*:text" ), so $( "input:text" ) should be used instead.
Note: As of jQuery 1.5.2, :text selects input elements that have no specified type attribute (in which case type="text" is implied).
From 444039c491992338ba50b8bed7675d8c5f31202c Mon Sep 17 00:00:00 2001
From: Karl Swedberg
Date: Sat, 15 Nov 2014 11:44:10 -0500
Subject: [PATCH 148/699] 1.11.34
---
package.json | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/package.json b/package.json
index 9d0f1cb0..9ed57519 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.11.33",
+ "version": "1.11.34",
"homepage": "https://github.com/jquery/api.jquery.com",
"author": {
"name": "jQuery Foundation (https://jquery.org/)"
From 1029bf307dfe53468994c522eee342e6291d6056 Mon Sep 17 00:00:00 2001
From: Aurelio De Rosa
Date: Tue, 18 Nov 2014 13:05:21 -0500
Subject: [PATCH 149/699] live(): The parameter is optional.
Closes gh-589.
---
entries/live.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/entries/live.xml b/entries/live.xml
index 95f9d5d8..049322e2 100644
--- a/entries/live.xml
+++ b/entries/live.xml
@@ -17,7 +17,7 @@
A string containing a JavaScript event type, such as "click" or "keydown." As of jQuery 1.4 the string can contain multiple, space-separated event types or custom event names.
-
+ An object containing data that will be passed to the event handler.
From bf15a22f2926e92b9dc2bf6d01c897d797ac9284 Mon Sep 17 00:00:00 2001
From: Aurelio De Rosa
Date: Tue, 18 Nov 2014 13:08:12 -0500
Subject: [PATCH 150/699] triggerHandler(): Add plainObject type to
extraParameters argument
Closes gh-590
---
entries/triggerHandler.xml | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/entries/triggerHandler.xml b/entries/triggerHandler.xml
index df6fb8af..2167142e 100644
--- a/entries/triggerHandler.xml
+++ b/entries/triggerHandler.xml
@@ -7,8 +7,10 @@
A string containing a JavaScript event type, such as click or submit.
-
- An array of additional parameters to pass along to the event handler.
+
+
+
+ Additional parameters to pass along to the event handler.
From 4e8e8dcb7773004bda308dd9e57ff8b86f342766 Mon Sep 17 00:00:00 2001
From: Karl Swedberg
Date: Tue, 18 Nov 2014 13:08:52 -0500
Subject: [PATCH 151/699] 1.11.35
---
package.json | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/package.json b/package.json
index 9ed57519..ea892b16 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.11.34",
+ "version": "1.11.35",
"homepage": "https://github.com/jquery/api.jquery.com",
"author": {
"name": "jQuery Foundation (https://jquery.org/)"
From a3cc9b422c5c245a1f334f65de82275dda048084 Mon Sep 17 00:00:00 2001
From: tym-network
Date: Wed, 19 Nov 2014 08:27:14 -0500
Subject: [PATCH 152/699] contents(): Add a missing space
Closes gh-591
---
entries/contents.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/entries/contents.xml b/entries/contents.xml
index 833aea25..d10defc0 100644
--- a/entries/contents.xml
+++ b/entries/contents.xml
@@ -6,7 +6,7 @@
Get the children of each element in the set of matched elements, including text and comment nodes.
-
Given a jQuery object that represents a set of DOM elements, the .contents() method allows us to search throughthe immediate children of these elements in the DOM tree and construct a new jQuery object from the matching elements. The .contents() and .children() methods are similar, except that the former includes text nodes as well as HTML elements in the resulting jQuery object.
+
Given a jQuery object that represents a set of DOM elements, the .contents() method allows us to search through the immediate children of these elements in the DOM tree and construct a new jQuery object from the matching elements. The .contents() and .children() methods are similar, except that the former includes text nodes as well as HTML elements in the resulting jQuery object.
The .contents() method can also be used to get the content document of an iframe, if the iframe is on the same domain as the main page.
Consider a simple <div> with a number of text nodes, each of which is separated by two line break elements (<br>):
From f0466fb5fc4fcd686e608f1b47aaeb5d467aacf2 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Scott=20Gonz=C3=A1lez?=
Date: Tue, 2 Dec 2014 09:50:19 -0500
Subject: [PATCH 153/699] removeProp: Fix errors in code example
Fixes #604
---
entries/removeProp.xml | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/entries/removeProp.xml b/entries/removeProp.xml
index 0f4b7790..987ab339 100644
--- a/entries/removeProp.xml
+++ b/entries/removeProp.xml
@@ -17,11 +17,12 @@
Set a numeric property on a paragraph and then remove it.
Date: Tue, 2 Dec 2014 09:50:44 -0500
Subject: [PATCH 154/699] 1.11.36
---
package.json | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/package.json b/package.json
index ea892b16..43f1c399 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.11.35",
+ "version": "1.11.36",
"homepage": "https://github.com/jquery/api.jquery.com",
"author": {
"name": "jQuery Foundation (https://jquery.org/)"
From 6d903c8f4a14769377b40e9974b1c6bbc498f7b4 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Scott=20Gonz=C3=A1lez?=
Date: Tue, 2 Dec 2014 15:57:59 -0500
Subject: [PATCH 155/699] Build: Replace grunt-clean with rimraf
---
grunt.js | 10 ++++++----
package.json | 4 ++--
2 files changed, 8 insertions(+), 6 deletions(-)
diff --git a/grunt.js b/grunt.js
index ea16b469..0be80090 100644
--- a/grunt.js
+++ b/grunt.js
@@ -1,18 +1,16 @@
+var rimraf = require( "rimraf" );
+
/*jshint node:true */
module.exports = function( grunt ) {
"use strict";
var entryFiles = grunt.file.expandFiles( "entries/*.xml" );
-grunt.loadNpmTasks( "grunt-clean" );
grunt.loadNpmTasks( "grunt-wordpress" );
grunt.loadNpmTasks( "grunt-jquery-content" );
grunt.loadNpmTasks( "grunt-check-modules" );
grunt.initConfig({
- clean: {
- folder: "dist"
- },
lint: {
grunt: "grunt.js"
},
@@ -36,6 +34,10 @@ grunt.initConfig({
}, grunt.file.readJSON( "config.json" ) )
});
+grunt.registerTask( "clean", function() {
+ rimraf.sync( "dist" );
+});
+
grunt.registerTask( "default", "build-wordpress" );
grunt.registerTask( "build", "build-pages build-xml-entries build-xml-categories build-xml-full build-resources" );
grunt.registerTask( "build-wordpress", "check-modules clean lint xmllint build" );
diff --git a/package.json b/package.json
index 43f1c399..f421d5ad 100644
--- a/package.json
+++ b/package.json
@@ -22,10 +22,10 @@
],
"dependencies": {
"grunt": "0.3.17",
- "grunt-clean": "0.3.0",
"grunt-wordpress": "1.2.1",
"grunt-jquery-content": "0.13.0",
- "grunt-check-modules": "0.1.0"
+ "grunt-check-modules": "0.1.0",
+ "rimraf": "2.2.8"
},
"devDependencies": {},
"keywords": []
From f0afafb380377f537a0fc7b412081c23ac4d7a52 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Scott=20Gonz=C3=A1lez?=
Date: Tue, 2 Dec 2014 16:00:41 -0500
Subject: [PATCH 156/699] Build: Remove unused tasks
---
grunt.js | 16 +++-------------
1 file changed, 3 insertions(+), 13 deletions(-)
diff --git a/grunt.js b/grunt.js
index 0be80090..dbe79fd3 100644
--- a/grunt.js
+++ b/grunt.js
@@ -1,25 +1,17 @@
var rimraf = require( "rimraf" );
-/*jshint node:true */
module.exports = function( grunt ) {
-"use strict";
var entryFiles = grunt.file.expandFiles( "entries/*.xml" );
-grunt.loadNpmTasks( "grunt-wordpress" );
-grunt.loadNpmTasks( "grunt-jquery-content" );
grunt.loadNpmTasks( "grunt-check-modules" );
+grunt.loadNpmTasks( "grunt-jquery-content" );
+grunt.loadNpmTasks( "grunt-wordpress" );
grunt.initConfig({
- lint: {
- grunt: "grunt.js"
- },
xmllint: {
all: [].concat( entryFiles, "categories.xml", "entries2html.xsl", "notes.xsl" )
},
- xmltidy: {
- all: [].concat( entryFiles, "categories.xml" )
- },
"build-pages": {
all: grunt.file.expandFiles( "pages/**" )
},
@@ -38,9 +30,7 @@ grunt.registerTask( "clean", function() {
rimraf.sync( "dist" );
});
-grunt.registerTask( "default", "build-wordpress" );
grunt.registerTask( "build", "build-pages build-xml-entries build-xml-categories build-xml-full build-resources" );
-grunt.registerTask( "build-wordpress", "check-modules clean lint xmllint build" );
-grunt.registerTask( "tidy", "xmllint xmltidy" );
+grunt.registerTask( "build-wordpress", "check-modules clean xmllint build" );
};
From 04f42c47bfa8a3236b76dd69a332359384a1a4b5 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Scott=20Gonz=C3=A1lez?=
Date: Tue, 2 Dec 2014 16:06:50 -0500
Subject: [PATCH 157/699] README: Cleanup
---
README.md | 15 ++++++---------
1 file changed, 6 insertions(+), 9 deletions(-)
diff --git a/README.md b/README.md
index e33d9099..67260550 100644
--- a/README.md
+++ b/README.md
@@ -1,18 +1,15 @@
-## Referencing Bug Tracker Tickets
+# api.jquery.com
-* Pull requests for changes that were requested or recommended via the [jQuery Issue Tracker](https://github.com/jquery/jquery/issues) should include a link back to the relevant ticket.
+## Building and Deploying
-## Building
+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/).
### Requirements
-* libxml2
-* 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.
+* [libxml2](http://xmlsoft.org/)
+* [libxslt](http://xmlsoft.org/libxslt/)
-### Build
-
-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/).
+The `xmllint` and `xsltproc` utilities need to be in your path. If you are on Windows, you can get libxml2 and libxslt from GnuWin32.
## Style Guidelines
From 1af30ac254c825907de2cbeb9a1f0f28fe8cc24e Mon Sep 17 00:00:00 2001
From: Karl Swedberg
Date: Tue, 2 Dec 2014 20:03:07 -0500
Subject: [PATCH 158/699] jQuery.ajax: Remove warning about PUT and DELETE
Fixes gh-412
---
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 7f8b7d3b..94e223cc 100644
--- a/entries/jQuery.ajax.xml
+++ b/entries/jQuery.ajax.xml
@@ -142,7 +142,7 @@ $.ajax({
Set this to true if you wish to use the traditional style of param serialization.
- The type of request to make ("POST" or "GET"), default is "GET". Note: Other HTTP request methods, such as PUT and DELETE, can also be used here, but they are not supported by all browsers.
+ The type of request to make (e.g. "POST", "GET", "PUT"); default is "GET". A string containing the URL to which the request is sent.
From c797af05d9ecb509f1b829642abe2fb20a28fc1b Mon Sep 17 00:00:00 2001
From: Karl Swedberg
Date: Tue, 2 Dec 2014 20:14:09 -0500
Subject: [PATCH 159/699] 1.11.37
---
package.json | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/package.json b/package.json
index f421d5ad..db8831d3 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.11.36",
+ "version": "1.11.37",
"homepage": "https://github.com/jquery/api.jquery.com",
"author": {
"name": "jQuery Foundation (https://jquery.org/)"
From d39fb3dcba61ef3f56ba3a0e82c4143ee3427cfa Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Scott=20Gonz=C3=A1lez?=
Date: Fri, 5 Dec 2014 09:00:06 -0500
Subject: [PATCH 160/699] Build: Upgrade to Grunt 0.4.5
* Upgrade to grunt-check-modules 0.2.0
* Upgrade to grunt-jquery-content 1.0.0
---
.gitignore | 13 +++----------
Gruntfile.js | 53 ++++++++++++++++++++++++++++++++++++++++++++++++++++
grunt.js | 36 -----------------------------------
package.json | 7 +++----
4 files changed, 59 insertions(+), 50 deletions(-)
create mode 100644 Gruntfile.js
delete mode 100644 grunt.js
diff --git a/.gitignore b/.gitignore
index 2dc8b339..633f1bde 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,10 +1,3 @@
-dist
-entries_tmp
-node_modules
-config.json
-.project
-*~
-*.diff
-*.patch
-.DS_Store
-.settings
\ No newline at end of file
+/dist/
+/node_modules/
+config.js*
diff --git a/Gruntfile.js b/Gruntfile.js
new file mode 100644
index 00000000..f6bc20df
--- /dev/null
+++ b/Gruntfile.js
@@ -0,0 +1,53 @@
+var rimraf = require( "rimraf" );
+
+module.exports = function( grunt ) {
+
+grunt.loadNpmTasks( "grunt-check-modules" );
+grunt.loadNpmTasks( "grunt-jquery-content" );
+
+grunt.initConfig({
+ xmllint: {
+ all: [
+ "entries/**",
+ "includes/**",
+ "categories.xml",
+ "entries2html.xsl",
+ "notes.xsl"
+ ]
+ },
+ "build-pages": {
+ all: "pages/**"
+ },
+ "build-xml-entries": {
+ all: "entries/**"
+ },
+ "build-resources": {
+ all: "resources/**"
+ },
+ wordpress: (function() {
+ var config = require( "./config" );
+ config.dir = "dist/wordpress";
+ return config;
+ })()
+});
+
+grunt.registerTask( "clean", function() {
+ rimraf.sync( "dist" );
+});
+
+grunt.registerTask( "build", [
+ "build-pages",
+ "build-resources",
+ "build-xml-entries",
+ "build-xml-categories",
+ "build-xml-full"
+]);
+
+grunt.registerTask( "build-wordpress", [
+ "check-modules",
+ "xmllint",
+ "clean",
+ "build"
+]);
+
+};
diff --git a/grunt.js b/grunt.js
deleted file mode 100644
index dbe79fd3..00000000
--- a/grunt.js
+++ /dev/null
@@ -1,36 +0,0 @@
-var rimraf = require( "rimraf" );
-
-module.exports = function( grunt ) {
-
-var entryFiles = grunt.file.expandFiles( "entries/*.xml" );
-
-grunt.loadNpmTasks( "grunt-check-modules" );
-grunt.loadNpmTasks( "grunt-jquery-content" );
-grunt.loadNpmTasks( "grunt-wordpress" );
-
-grunt.initConfig({
- xmllint: {
- all: [].concat( entryFiles, "categories.xml", "entries2html.xsl", "notes.xsl" )
- },
- "build-pages": {
- all: grunt.file.expandFiles( "pages/**" )
- },
- "build-xml-entries": {
- all: entryFiles
- },
- "build-resources": {
- all: grunt.file.expandFiles( "resources/**" )
- },
- wordpress: grunt.utils._.extend({
- dir: "dist/wordpress"
- }, grunt.file.readJSON( "config.json" ) )
-});
-
-grunt.registerTask( "clean", function() {
- rimraf.sync( "dist" );
-});
-
-grunt.registerTask( "build", "build-pages build-xml-entries build-xml-categories build-xml-full build-resources" );
-grunt.registerTask( "build-wordpress", "check-modules clean xmllint build" );
-
-};
diff --git a/package.json b/package.json
index db8831d3..41f1592d 100644
--- a/package.json
+++ b/package.json
@@ -21,10 +21,9 @@
}
],
"dependencies": {
- "grunt": "0.3.17",
- "grunt-wordpress": "1.2.1",
- "grunt-jquery-content": "0.13.0",
- "grunt-check-modules": "0.1.0",
+ "grunt": "0.4.5",
+ "grunt-check-modules": "0.2.0",
+ "grunt-jquery-content": "1.0.0",
"rimraf": "2.2.8"
},
"devDependencies": {},
From 622226edc7b9b91ba190f54ea88ccffef0c0612c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Scott=20Gonz=C3=A1lez?=
Date: Fri, 5 Dec 2014 09:04:58 -0500
Subject: [PATCH 161/699] Build: Remove dates from copyright notice
---
LICENSE.txt | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/LICENSE.txt b/LICENSE.txt
index 01839718..19a9bad2 100644
--- a/LICENSE.txt
+++ b/LICENSE.txt
@@ -1,6 +1,5 @@
-Copyright 2009 Packt Publishing, http://packtpub.com/
-Copyright 2012, 2014 jQuery Foundation and other contributors,
-https://jquery.org/
+Copyright Packt Publishing (http://packtpub.com/),
+jQuery Foundation (https://jquery.org/), and other contributors.
This software consists of voluntary contributions made by many
individuals. For exact contribution history, see the revision history
From 6d2054fc066cb7019be831eff76bd1c05b2270a1 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Scott=20Gonz=C3=A1lez?=
Date: Fri, 5 Dec 2014 09:05:55 -0500
Subject: [PATCH 162/699] Build: package.json cleanup
---
package.json | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a/package.json b/package.json
index 41f1592d..bc682bf5 100644
--- a/package.json
+++ b/package.json
@@ -5,7 +5,7 @@
"version": "1.11.37",
"homepage": "https://github.com/jquery/api.jquery.com",
"author": {
- "name": "jQuery Foundation (https://jquery.org/)"
+ "name": "jQuery Foundation and other contributors"
},
"repository": {
"type": "git",
@@ -17,7 +17,7 @@
"licenses": [
{
"type": "MIT",
- "url": "http://www.opensource.org/licenses/MIT"
+ "url": "https://github.com/jquery/api.jquery.com/blob/master/LICENSE.txt"
}
],
"dependencies": {
@@ -25,7 +25,5 @@
"grunt-check-modules": "0.2.0",
"grunt-jquery-content": "1.0.0",
"rimraf": "2.2.8"
- },
- "devDependencies": {},
- "keywords": []
+ }
}
From 001d725dba78a4e00d8e1e3a352cb27c41bb7cde Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Scott=20Gonz=C3=A1lez?=
Date: Fri, 5 Dec 2014 15:12:16 -0500
Subject: [PATCH 163/699] 1.11.38
---
package.json | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/package.json b/package.json
index bc682bf5..258fe004 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.11.37",
+ "version": "1.11.38",
"homepage": "https://github.com/jquery/api.jquery.com",
"author": {
"name": "jQuery Foundation and other contributors"
From 82daaa0fded99c2a92fcba1f31b1cf0d9594fae5 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Scott=20Gonz=C3=A1lez?=
Date: Mon, 8 Dec 2014 12:17:18 -0500
Subject: [PATCH 164/699] Build: Upgrade to grunt-jquery-content 2.0.0
---
Gruntfile.js | 20 ++++----------------
package.json | 4 +---
2 files changed, 5 insertions(+), 19 deletions(-)
diff --git a/Gruntfile.js b/Gruntfile.js
index f6bc20df..cc71e7be 100644
--- a/Gruntfile.js
+++ b/Gruntfile.js
@@ -1,8 +1,5 @@
-var rimraf = require( "rimraf" );
-
module.exports = function( grunt ) {
-grunt.loadNpmTasks( "grunt-check-modules" );
grunt.loadNpmTasks( "grunt-jquery-content" );
grunt.initConfig({
@@ -15,8 +12,8 @@ grunt.initConfig({
"notes.xsl"
]
},
- "build-pages": {
- all: "pages/**"
+ "build-posts": {
+ page: "pages/**"
},
"build-xml-entries": {
all: "entries/**"
@@ -31,23 +28,14 @@ grunt.initConfig({
})()
});
-grunt.registerTask( "clean", function() {
- rimraf.sync( "dist" );
-});
+grunt.registerTask( "lint", [ "xmllint" ]);
grunt.registerTask( "build", [
- "build-pages",
+ "build-posts",
"build-resources",
"build-xml-entries",
"build-xml-categories",
"build-xml-full"
]);
-grunt.registerTask( "build-wordpress", [
- "check-modules",
- "xmllint",
- "clean",
- "build"
-]);
-
};
diff --git a/package.json b/package.json
index 258fe004..9c4b386c 100644
--- a/package.json
+++ b/package.json
@@ -22,8 +22,6 @@
],
"dependencies": {
"grunt": "0.4.5",
- "grunt-check-modules": "0.2.0",
- "grunt-jquery-content": "1.0.0",
- "rimraf": "2.2.8"
+ "grunt-jquery-content": "2.0.0"
}
}
From 0a5bd237f3c77c7b55efd50ba1b7b5a2d00498db Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Scott=20Gonz=C3=A1lez?=
Date: Mon, 8 Dec 2014 12:22:24 -0500
Subject: [PATCH 165/699] 1.11.39
---
package.json | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/package.json b/package.json
index 9c4b386c..f955be2e 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.11.38",
+ "version": "1.11.39",
"homepage": "https://github.com/jquery/api.jquery.com",
"author": {
"name": "jQuery Foundation and other contributors"
From 5a0192c0a4c89725dd69bb4b67cfb2c91ab68ae7 Mon Sep 17 00:00:00 2001
From: Arthur Verschaeve
Date: Sun, 7 Dec 2014 12:12:50 +0100
Subject: [PATCH 166/699] add: Fix element type
Closes gh-606
Fixes gh-309
---
entries/add.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/entries/add.xml b/entries/add.xml
index 04b4a3bc..6f1d7870 100644
--- a/entries/add.xml
+++ b/entries/add.xml
@@ -9,7 +9,7 @@
1.0
-
+ One or more elements to add to the set of matched elements.
From 891500f6de5b05748fd633da604561f489dc4f51 Mon Sep 17 00:00:00 2001
From: Arthur Verschaeve
Date: Sun, 21 Dec 2014 15:00:18 +0100
Subject: [PATCH 167/699] toggleClass: rename 'switch' variable
Closes gh-610
Fixes gh-581
---
entries/toggleClass.xml | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/entries/toggleClass.xml b/entries/toggleClass.xml
index a4516652..1d034d86 100644
--- a/entries/toggleClass.xml
+++ b/entries/toggleClass.xml
@@ -12,13 +12,13 @@
One or more class names (separated by spaces) to be toggled for each element in the matched set.
-
+ A Boolean (not just truthy/falsy) value to determine whether the class should be added or removed.1.4
-
+ A boolean value to determine whether the class should be added or removed.
@@ -27,15 +27,15 @@
-
+
- A function that returns class names to be toggled in the class attribute of each element in the matched set. Receives the index position of the element in the set, the old class value, and the switch as arguments.
+ A function that returns class names to be toggled in the class attribute of each element in the matched set. Receives the index position of the element in the set, the old class value, and the state as arguments.
-
+ A boolean value to determine whether the class should be added or removed.
- Add or remove one or more classes from each element in the set of matched elements, depending on either the class's presence or the value of the switch argument.
+ Add or remove one or more classes from each element in the set of matched elements, depending on either the class's presence or the value of the state argument.
This method takes one or more class names as its parameter. In the first version, if an element in the matched set of elements already has the class, then it is removed; if an element does not have the class, then it is added. For example, we can apply .toggleClass() to a simple <div>:
From e77a192cdc3691596a87a1b50a85babbdb32cce8 Mon Sep 17 00:00:00 2001
From: Corey Frang
Date: Mon, 22 Dec 2014 13:59:58 -0500
Subject: [PATCH 168/699] jQuery.ajax: Document contentType false
Added Boolean as a type for contentType.
Added a sentance about what passing false does for contentType
Ref gh-547
Ref gh-369
---
entries/jQuery.ajax.xml | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/entries/jQuery.ajax.xml b/entries/jQuery.ajax.xml
index 94e223cc..21463bb8 100644
--- a/entries/jQuery.ajax.xml
+++ b/entries/jQuery.ajax.xml
@@ -37,8 +37,10 @@
An object of string/regular-expression pairs that determine how jQuery will parse the response, given its content type.
-
- When sending data to the server, use this content type. Default is "application/x-www-form-urlencoded; charset=UTF-8", which is fine for most cases. If you explicitly pass in a content-type to $.ajax(), then it is always sent to the server (even if no data is sent). The W3C XMLHttpRequest specification dictates that the charset is always UTF-8; specifying another charset will not force the browser to change the encoding. Note: For cross-domain requests, setting the content type to anything other than application/x-www-form-urlencoded, multipart/form-data, or text/plain will trigger the browser to send a preflight OPTIONS request to the server.
+
+
+
+ When sending data to the server, use this content type. Default is "application/x-www-form-urlencoded; charset=UTF-8", which is fine for most cases. If you explicitly pass in a content-type to $.ajax(), then it is always sent to the server (even if no data is sent). As of jQuery 1.6 you can pass false to tell jQuery to not set any content type header. Note: The W3C XMLHttpRequest specification dictates that the charset is always UTF-8; specifying another charset will not force the browser to change the encoding. Note: For cross-domain requests, setting the content type to anything other than application/x-www-form-urlencoded, multipart/form-data, or text/plain will trigger the browser to send a preflight OPTIONS request to the server.This object will be made the context of all Ajax-related callbacks. By default, the context is an object that represents the ajax settings used in the call ($.ajaxSettings merged with the settings passed to $.ajax). For example, specifying a DOM element as the context will make that the context for the complete callback of a request, like so:
From eb7611d91dbd93f262a9a8ddb2b8d9573d1c7736 Mon Sep 17 00:00:00 2001
From: Corey Frang
Date: Mon, 22 Dec 2014 14:10:59 -0500
Subject: [PATCH 169/699] parent: Clarify wording about behavior
Fixes gh-537
Ref gh-543
---
entries/parent.xml | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/entries/parent.xml b/entries/parent.xml
index 0fdf5b73..4c375255 100644
--- a/entries/parent.xml
+++ b/entries/parent.xml
@@ -9,8 +9,8 @@
Get the parent of each element in the current set of matched elements, optionally filtered by a selector.
-
Given a jQuery object that represents a set of DOM elements, the .parent() method allows us to search through the parents of these elements in the DOM tree and construct a new jQuery object from the matching elements.
-
The .parents() and .parent() methods are similar, except that the latter only travels a single level up the DOM tree. Also, $( "html" ).parent() method returns a set containing document whereas $( "html" ).parents() returns an empty set.
+
Given a jQuery object that represents a set of DOM elements, the parent() method traverses to the immediate parent of each of these elements in the DOM tree and constructs a new jQuery object from the matching elements.
+
This method is similar to .parents(), except .parent() only travels a single level up the DOM tree. Also, $( "html" ).parent() method returns a set containing document whereas $( "html" ).parents() returns an empty set.
The method optionally accepts a selector expression of the same type that we can pass to the $() function. If the selector is supplied, the elements will be filtered by testing whether they match it.
The event object is always passed as the first parameter to an event handler. An array of arguments can also be passed to the .trigger() call, and these parameters will be passed along to the handler as well following the event object. As of jQuery 1.6.2, single string or numeric argument can be passed without being wrapped in an array.
Note the difference between the extra parameters passed here and the eventData parameter to the .on() method. Both are mechanisms for passing information to an event handler, but the extraParameters argument to .trigger() allows information to be determined at the time the event is triggered, while the eventData argument to .on() requires the information to be already computed at the time the handler is bound.
The .trigger() method can be used on jQuery collections that wrap plain JavaScript objects similar to a pub/sub mechanism; any event handlers bound to the object will be called when the event is triggered.
-
Note: For both plain objects and DOM objects other than window, if a triggered event name matches the name of a property on the object, jQuery will attempt to invoke the property as a method if no event handler calls event.preventDefault(). If this behavior is not desired, use .triggerHandler() instead.
-
Note: As with .triggerHandler(), when calling .trigger() with an event name matches the name of a property on the object, prefixed by on (e.g. triggering click on window that has a non null onclick method), jQuery will attempt to invoke that property as a method.
+
Note: For both plain objects and DOM objects other than window, if a triggered event name matches the name of a property on the object, jQuery will attempt to invoke the property as a method if no event handler calls event.preventDefault(). If this behavior is not desired, use .triggerHandler() instead.
+
Note: As with .triggerHandler(), when calling .trigger() with an event name matches the name of a property on the object, prefixed by on (e.g. triggering click on window that has a non null onclick method), jQuery will attempt to invoke that property as a method.
Clicks to button #2 also trigger a click for button #1.
From 41fc7513bd8b186bab24483443c1dc5a4faad5d0 Mon Sep 17 00:00:00 2001
From: Corey Frang
Date: Mon, 22 Dec 2014 11:12:28 -0500
Subject: [PATCH 171/699] triggerHandler: Rephrase description and differences
from trigger
---
entries/triggerHandler.xml | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/entries/triggerHandler.xml b/entries/triggerHandler.xml
index 2167142e..e174311f 100644
--- a/entries/triggerHandler.xml
+++ b/entries/triggerHandler.xml
@@ -14,9 +14,9 @@
-
The .triggerHandler() method behaves similarly to .trigger(), with the following exceptions:
+
.triggerHandler( eventType ) executes all handlers bound with jQuery for the event type. It will also execute any method called on{eventType}() found on the element. The behavior of this method is similar to .trigger(), with the following exceptions:
-
The .triggerHandler() method does not cause the default behavior of an event to occur (such as a form submission).
+
The .triggerHandler( "event" ) method will not call .event() on the element it is triggered on. This means .triggerHandler( "submit" ) on a form will not call .submit() on the form.
While .trigger() will operate on all elements matched by the jQuery object, .triggerHandler() only affects the first matched element.
Events triggered with .triggerHandler() do not bubble up the DOM hierarchy; if they are not handled by the target element directly, they do nothing.
Instead of returning the jQuery object (to allow chaining), .triggerHandler() returns whatever value was returned by the last handler it caused to be executed. If no handlers are triggered, it returns undefined
From d443d9610abed4a28712602b3b918be25ca0d87e Mon Sep 17 00:00:00 2001
From: Aurelio De Rosa
Date: Mon, 6 Oct 2014 02:24:42 +0100
Subject: [PATCH 172/699] deferred.progress: Accepts multiple arguments
Closes gh-568
---
entries/deferred.progress.xml | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/entries/deferred.progress.xml b/entries/deferred.progress.xml
index fd7635a1..3a827a24 100644
--- a/entries/deferred.progress.xml
+++ b/entries/deferred.progress.xml
@@ -10,10 +10,17 @@
A function, or array of functions, to be called when the Deferred generates progress notifications.
+
+
+
+
+ Optional additional function, or array of functions, to be called when the Deferred generates progress notifications.
+
+ Add handlers to be called when the Deferred object generates progress notifications.
-
The argument can be either a single function or an array of functions. When the Deferred generates progress notifications by calling notify or notifyWith, the progressCallbacks are called. Since deferred.progress() returns the Deferred object, other methods of the Deferred object can be chained to this one. When the Deferred is resolved or rejected, progress callbacks will no longer be called, with the exception that any progressCallbacks added after the Deferred enters the resolved or rejected state are executed immediately when they are added, using the arguments that were passed to the .notify() or notifyWith() call. For more information, see the documentation for jQuery.Deferred().
+
The deferred.progress() method accepts one or more arguments, all of which can be either a single function or an array of functions. When the Deferred generates progress notifications by calling notify or notifyWith, the progressCallbacks are called. Since deferred.progress() returns the Deferred object, other methods of the Deferred object can be chained to this one. When the Deferred is resolved or rejected, progress callbacks will no longer be called, with the exception that any progressCallbacks added after the Deferred enters the resolved or rejected state are executed immediately when they are added, using the arguments that were passed to the .notify() or notifyWith() call. For more information, see the documentation for jQuery.Deferred().
From 0c7e90bc8d00d95d0f9526a8b886e525514a266a Mon Sep 17 00:00:00 2001
From: Aurelio De Rosa
Date: Fri, 10 Oct 2014 20:19:27 +0100
Subject: [PATCH 173/699] jQuery.when: Update to "Promise-Compatible"
Based on gh-567 the returned value of $.ajax() is actually a Promise-compatible object and not a Promise object.
Closes gh-574
Ref gh-567
---
entries/jQuery.when.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/entries/jQuery.when.xml b/entries/jQuery.when.xml
index e28819e3..310613e7 100644
--- a/entries/jQuery.when.xml
+++ b/entries/jQuery.when.xml
@@ -9,7 +9,7 @@
Provides a way to execute callback functions based on one or more objects, usually Deferred objects that represent asynchronous events.
-
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 and can be used this way:
+
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:
$.when( $.ajax( "test.aspx" ) ).then(function( data, textStatus, jqXHR ) {
alert( jqXHR.status ); // Alerts 200
From d2c4f7a2cad3c14b4930a82ce9a680c31cb73a83 Mon Sep 17 00:00:00 2001
From: Arthur Verschaeve
Date: Fri, 2 Jan 2015 18:25:49 +0100
Subject: [PATCH 174/699] finish: clarify .finish() defaults to .finish("fx")
Closes gh-615
Fixes gh-464
---
entries/finish.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/entries/finish.xml b/entries/finish.xml
index 96975750..506d53f2 100644
--- a/entries/finish.xml
+++ b/entries/finish.xml
@@ -4,7 +4,7 @@
Stop the currently-running animation, remove all queued animations, and complete all animations for the matched elements.1.9
-
+ The name of the queue in which to stop animations.
From a6b3b6ffcb6e6366fd1dfc92d43950f74647a987 Mon Sep 17 00:00:00 2001
From: Aurelio De Rosa
Date: Sun, 11 Jan 2015 20:12:10 -0500
Subject: [PATCH 175/699] jQuery.getJSON: Update data argument. Can take
string.
---
entries/jQuery.getJSON.xml | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/entries/jQuery.getJSON.xml b/entries/jQuery.getJSON.xml
index 1485a2a2..97c8b0a9 100644
--- a/entries/jQuery.getJSON.xml
+++ b/entries/jQuery.getJSON.xml
@@ -6,7 +6,9 @@
A string containing the URL to which the request is sent.
-
+
+
+ A plain object or string that is sent to the server with the request.
From 4730880526de7b8fc3e9cf76803a6716105b3bb5 Mon Sep 17 00:00:00 2001
From: Karl Swedberg
Date: Sun, 11 Jan 2015 21:21:06 -0500
Subject: [PATCH 176/699] 1.11.40
---
package.json | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/package.json b/package.json
index f955be2e..6c608d92 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.11.39",
+ "version": "1.11.40",
"homepage": "https://github.com/jquery/api.jquery.com",
"author": {
"name": "jQuery Foundation and other contributors"
From 1373b93d9bdf774782c6c14d0522ab0933498ce5 Mon Sep 17 00:00:00 2001
From: Arthur Verschaeve
Date: Thu, 15 Jan 2015 07:15:31 +0100
Subject: [PATCH 177/699] attr: move parenthesis outside code element
Closes gh-612
---
entries/attr.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/entries/attr.xml b/entries/attr.xml
index 3e181e67..f0f1408b 100644
--- a/entries/attr.xml
+++ b/entries/attr.xml
@@ -206,7 +206,7 @@ $( "#greatphoto" ).attr( "title", function( i, val ) {
});
This use of a function to compute attribute values can be particularly useful when modifying the attributes of multiple elements at once.
-
Note: If nothing is returned in the setter function (ie. function(index, attr){}), or if undefined is returned, the current value is not changed. This is useful for selectively setting values only when certain criteria are met.
+
Note: If nothing is returned in the setter function (ie. function(index, attr){}), or if undefined is returned, the current value is not changed. This is useful for selectively setting values only when certain criteria are met.
Set some attributes for all <img>s in the page.
From 50ce24477abf3a5156a02296427092c8f6975123 Mon Sep 17 00:00:00 2001
From: Anne-Gaelle Colom
Date: Sat, 17 Jan 2015 10:23:00 +0000
Subject: [PATCH 178/699] Image-selector: Fix incorrect closing tag
Closes gh-626
---
entries/image-selector.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/entries/image-selector.xml b/entries/image-selector.xml
index 461c438c..8af0a351 100644
--- a/entries/image-selector.xml
+++ b/entries/image-selector.xml
@@ -42,7 +42,7 @@ $( "form" ).submit(function( event ) {
From 95a9b6591549cec0e1b07b8ee6baa1d625071262 Mon Sep 17 00:00:00 2001
From: Karl Swedberg
Date: Sun, 18 Jan 2015 17:38:42 -0500
Subject: [PATCH 179/699] on(): Remove ambiguous information about event
handlers on detached DOM elements. Fixes gh-548
---
entries/on.xml | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/entries/on.xml b/entries/on.xml
index eeab0009..0f2f9474 100644
--- a/entries/on.xml
+++ b/entries/on.xml
@@ -41,18 +41,18 @@
The majority of browser events bubble, or propagate, from the deepest, innermost element (the event target) in the document where they occur all the way up to the body and the document element. In Internet Explorer 8 and lower, a few events such as change and submit do not natively bubble but jQuery patches these to bubble and create consistent cross-browser behavior.
If selector is omitted or is null, the event handler is referred to as direct or directly-bound. The handler is called every time an event occurs on the selected elements, whether it occurs directly on the element or bubbles from a descendant (inner) element.
When a selector is provided, the event handler is referred to as delegated. The handler is not called when the event occurs directly on the bound element, but only for descendants (inner elements) that match the selector. jQuery bubbles the event from the event target up to the element where the handler is attached (i.e., innermost to outermost element) and runs the handler for any elements along that path matching the selector.
-
Event handlers are bound only to the currently selected elements; they must exist on the page at the time your code makes the call to .on(). To ensure the elements are present and can be selected, perform event binding inside a document ready handler for elements that are in the HTML markup on the page. If new HTML is being injected into the page, select the elements and attach event handlers after the new HTML is placed into the page. Or, use delegated events to attach an event handler, as described next.
-
Delegated events have the advantage that they can process events from descendant elements that are added to the document at a later time. By picking an element that is guaranteed to be present at the time the delegated event handler is attached, you can use delegated events to avoid the need to frequently attach and remove event handlers. This element could be the container element of a view in a Model-View-Controller design, for example, or document if the event handler wants to monitor all bubbling events in the document. The document element is available in the head of the document before loading any other HTML, so it is safe to attach events there without waiting for the document to be ready.
+
Event handlers are bound only to the currently selected elements; they must exist at the time your code makes the call to .on(). To ensure the elements are present and can be selected, place scripts after the elements in the HTML markup or perform event binding inside a document ready handler. Alternatively, use delegated events to attach event handlers.
+
Delegated events have the advantage that they can process events from descendant elements that are added to the document at a later time. By picking an element that is guaranteed to be present at the time the delegated event handler is attached, you can use delegated events to avoid the need to frequently attach and remove event handlers. This element could be the container element of a view in a Model-View-Controller design, for example, or document if the event handler wants to monitor all bubbling events in the document. The document element is available in the head of the document before loading any other HTML, so it is safe to attach events there without waiting for the document to be ready.
In addition to their ability to handle events on descendant elements not yet created, another advantage of delegated events is their potential for much lower overhead when many elements must be monitored. On a data table with 1,000 rows in its tbody, this example attaches a handler to 1,000 elements:
A delegated-events approach attaches an event handler to only one element, the tbody, and the event only needs to bubble up one level (from the clicked tr to tbody):
+
An event-delegation approach attaches an event handler to only one element, the tbody, and the event only needs to bubble up one level (from the clicked tr to tbody):
In jQuery 1.4.3 setting an element's data object with .data(obj) extends the data previously stored with that element. jQuery itself uses the .data() method to save information under the names 'events' and 'handle', and also reserves any data name starting with an underscore ('_') for internal use.
+
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.
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.
From c24d60b33a3a62187addb85731d1eee0bb71e9d6 Mon Sep 17 00:00:00 2001
From: George Mauer
Date: Thu, 8 Jan 2015 23:12:52 -0600
Subject: [PATCH 184/699] jQuery.get, jQuery post: add new config object
signature
Fixes gh-620
Closes gh-622
---
entries/jQuery.get.xml | 6 ++++++
entries/jQuery.post.xml | 6 ++++++
2 files changed, 12 insertions(+)
diff --git a/entries/jQuery.get.xml b/entries/jQuery.get.xml
index 396e58b0..411a5889 100644
--- a/entries/jQuery.get.xml
+++ b/entries/jQuery.get.xml
@@ -1,6 +1,12 @@
jQuery.get()
+
+ 3.0
+
+ A set of key/value pairs that configure the Ajax request. All properties except for url are optional. A default can be set for any option with $.ajaxSetup(). See jQuery.ajax( settings ) for a complete list of all settings. The type option will automatically be set to POST.
+
+ 1.0
diff --git a/entries/jQuery.post.xml b/entries/jQuery.post.xml
index c066cbf4..2300cbe7 100644
--- a/entries/jQuery.post.xml
+++ b/entries/jQuery.post.xml
@@ -1,6 +1,12 @@
jQuery.post()
+
+ 3.0
+
+ A set of key/value pairs that configure the Ajax request. All properties except for url are optional. A default can be set for any option with $.ajaxSetup(). See jQuery.ajax( settings ) for a complete list of all settings. Type will automatically be set to POST.
+
+ 1.0
From 12c4d7e52300cb723e6e11aaea401cb8ab0a6d85 Mon Sep 17 00:00:00 2001
From: Arthur Verschaeve
Date: Tue, 20 Jan 2015 21:48:12 +0100
Subject: [PATCH 185/699] 1.11.43
---
package.json | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/package.json b/package.json
index 58e7ae6f..4618da73 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.11.42",
+ "version": "1.11.43",
"homepage": "https://github.com/jquery/api.jquery.com",
"author": {
"name": "jQuery Foundation and other contributors"
From 7852b046241d2f3f4d571e2f6b534b91b077e0c6 Mon Sep 17 00:00:00 2001
From: Aurelio De Rosa
Date: Thu, 22 Jan 2015 05:50:38 +0000
Subject: [PATCH 186/699] nth-last-of-type-selector: correct description
Fixes gh-603
Closes gh-629
---
entries/nth-last-of-type-selector.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/entries/nth-last-of-type-selector.xml b/entries/nth-last-of-type-selector.xml
index 91b3db02..eb96db43 100644
--- a/entries/nth-last-of-type-selector.xml
+++ b/entries/nth-last-of-type-selector.xml
@@ -8,7 +8,7 @@
The index of each child to match, starting with the last one (1), the string even or odd, or an equation ( eg. :nth-last-of-type(even), :nth-last-of-type(4n) )
- Selects all elements that are the nth-child of their parent, counting from the last element to the first.
+ Selects all the elements that are the nth-child of their parent in relation to siblings with the same element name, counting from the last element to the first.
Because jQuery's implementation of :nth- selectors is strictly derived from the CSS specification, the value of n is "1-indexed", meaning that the counting starts at 1. For other selector expressions such as :eq() or :even jQuery follows JavaScript's "0-indexed" counting. Given a single <ul> containing three <li>s, $('li:nth-last-of-type(1)') selects the third, last, <li>.
From 4f1bd2b871d3b2e221bd729f4b95bdb2af0c19ce Mon Sep 17 00:00:00 2001
From: Aurelio De Rosa
Date: Thu, 22 Jan 2015 15:01:11 +0000
Subject: [PATCH 187/699] jQuery.param: add jQuery collection as possible type
Fixes gh-598
Closes gh-631
---
entries/jQuery.param.xml | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/entries/jQuery.param.xml b/entries/jQuery.param.xml
index 56d88fc6..bc715497 100644
--- a/entries/jQuery.param.xml
+++ b/entries/jQuery.param.xml
@@ -6,7 +6,8 @@
- An array or object to serialize.
+
+ An array, a plain object, or a jQuery object to serialize.
@@ -14,13 +15,14 @@
- An array or object to serialize.
+
+ An array, a plain object, or a jQuery object to serialize.A Boolean indicating whether to perform a traditional "shallow" serialization.
- Create a serialized representation of an array or object, suitable for use in a URL query string or Ajax request.
+ Create a serialized representation of an array, a plain object, or a jQuery object suitable for use in a URL query string or Ajax request. In case a jQuery object is passed, it should contain <input> elements with name/value properties.
This function is used internally to convert form element values into a serialized string representation (See .serialize() for more information).
As of jQuery 1.3, the return value of a function is used instead of the function as a String.
From 2f2a30a8ee4f9fb5c3e35c99c2207da809f12e80 Mon Sep 17 00:00:00 2001
From: Arthur Verschaeve
Date: Thu, 22 Jan 2015 19:48:19 +0100
Subject: [PATCH 188/699] 1.11.44
---
package.json | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/package.json b/package.json
index 4618da73..aa4a7722 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.11.43",
+ "version": "1.11.44",
"homepage": "https://github.com/jquery/api.jquery.com",
"author": {
"name": "jQuery Foundation and other contributors"
From 52a1b7d7cbba2645f72f78f945f0ac150ddbd50b Mon Sep 17 00:00:00 2001
From: Arthur Verschaeve
Date: Sat, 3 Jan 2015 14:20:22 +0100
Subject: [PATCH 189/699] change: note that JS-initiated change does not
trigger change event
Fixes gh-345
Closes gh-617
---
entries/change.xml | 3 +++
1 file changed, 3 insertions(+)
diff --git a/entries/change.xml b/entries/change.xml
index 4884ff1e..97a9b5e7 100644
--- a/entries/change.xml
+++ b/entries/change.xml
@@ -52,6 +52,9 @@ $( "#other" ).click(function() {
After this code executes, clicks on Trigger the handler will also alert the message. The message will display twice, because the handler has been bound to the change event on both of the form elements.
As of jQuery 1.4, the change event bubbles in Internet Explorer, behaving consistently with the event in other modern browsers.
+
+
Note: Changing the value of an input element using JavaScript, using .val() for example, won't fire the event.
+
Attaches a change event to the select that gets the text for each selected option and writes them in the div. It then triggers the event for the initial text draw.
From baef2154dccfb55c68b90da70d4eca94391e84e4 Mon Sep 17 00:00:00 2001
From: Aurelio De Rosa
Date: Fri, 23 Jan 2015 14:18:25 +0000
Subject: [PATCH 190/699] off: add `.off(Event_object)` signature
Fixes gh-384
Closes gh-634
---
entries/off.xml | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/entries/off.xml b/entries/off.xml
index b83e3868..2c711a68 100644
--- a/entries/off.xml
+++ b/entries/off.xml
@@ -24,6 +24,12 @@
A selector which should match the one originally passed to .on() when attaching event handlers.
+
+ 1.7
+
+ A jQuery.Event object.
+
+ 1.7
From 860f822b19b08cb3f2331efe751e0befbf6a95fe Mon Sep 17 00:00:00 2001
From: Arthur Verschaeve
Date: Sun, 25 Jan 2015 21:56:40 +0100
Subject: [PATCH 191/699] 1.11.45
---
package.json | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/package.json b/package.json
index aa4a7722..79654d03 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.11.44",
+ "version": "1.11.45",
"homepage": "https://github.com/jquery/api.jquery.com",
"author": {
"name": "jQuery Foundation and other contributors"
From 8642d2e4a6a54f25b54bf04998d6db108b1fee0e Mon Sep 17 00:00:00 2001
From: Aurelio De Rosa
Date: Fri, 23 Jan 2015 23:50:14 +0000
Subject: [PATCH 192/699] unbind: update the signature to take a jQuery.Event
object
---
entries/unbind.xml | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/entries/unbind.xml b/entries/unbind.xml
index f7f61514..e6be9a13 100644
--- a/entries/unbind.xml
+++ b/entries/unbind.xml
@@ -23,8 +23,8 @@
1.0
-
- A JavaScript event object as passed to an event handler.
+
+ A jQuery.Event object.
From 3a5ff1550bce6e0879f65d0bf67906753d4f6662 Mon Sep 17 00:00:00 2001
From: Arthur Verschaeve
Date: Sat, 31 Jan 2015 17:52:07 +0100
Subject: [PATCH 193/699] 1.11.46
---
package.json | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/package.json b/package.json
index 79654d03..6e48a8e8 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.11.45",
+ "version": "1.11.46",
"homepage": "https://github.com/jquery/api.jquery.com",
"author": {
"name": "jQuery Foundation and other contributors"
From 3282ee5bc0473ab2b414865eb71a5752d48c9ca6 Mon Sep 17 00:00:00 2001
From: LaurentBarbareau
Date: Thu, 20 Nov 2014 15:49:46 +0100
Subject: [PATCH 194/699] jQuery.ajax: remove misplaced word
Closes gh-595
---
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 21463bb8..d7362cb2 100644
--- a/entries/jQuery.ajax.xml
+++ b/entries/jQuery.ajax.xml
@@ -43,7 +43,7 @@
When sending data to the server, use this content type. Default is "application/x-www-form-urlencoded; charset=UTF-8", which is fine for most cases. If you explicitly pass in a content-type to $.ajax(), then it is always sent to the server (even if no data is sent). As of jQuery 1.6 you can pass false to tell jQuery to not set any content type header. Note: The W3C XMLHttpRequest specification dictates that the charset is always UTF-8; specifying another charset will not force the browser to change the encoding. Note: For cross-domain requests, setting the content type to anything other than application/x-www-form-urlencoded, multipart/form-data, or text/plain will trigger the browser to send a preflight OPTIONS request to the server.
- This object will be made the context of all Ajax-related callbacks. By default, the context is an object that represents the ajax settings used in the call ($.ajaxSettings merged with the settings passed to $.ajax). For example, specifying a DOM element as the context will make that the context for the complete callback of a request, like so:
+ This object will be the context of all Ajax-related callbacks. By default, the context is an object that represents the ajax settings used in the call ($.ajaxSettings merged with the settings passed to $.ajax). For example, specifying a DOM element as the context will make that the context for the complete callback of a request, like so:
$.ajax({
url: "test.html",
From 881570d8fb901e0724d0ce17d8b6b5d3bab53bff Mon Sep 17 00:00:00 2001
From: Arthur Verschaeve
Date: Sat, 31 Jan 2015 18:05:43 +0100
Subject: [PATCH 195/699] 1.11.47
---
package.json | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/package.json b/package.json
index 6e48a8e8..9521f6f8 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.11.46",
+ "version": "1.11.47",
"homepage": "https://github.com/jquery/api.jquery.com",
"author": {
"name": "jQuery Foundation and other contributors"
From 76c6268061695b515ae7151aecab1a8f2af38efa Mon Sep 17 00:00:00 2001
From: Arthur Verschaeve
Date: Thu, 29 Jan 2015 17:38:02 +0100
Subject: [PATCH 196/699] jQuery.get: fix default for `type` option
Closes gh-640
---
entries/jQuery.get.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/entries/jQuery.get.xml b/entries/jQuery.get.xml
index 411a5889..aefc58fa 100644
--- a/entries/jQuery.get.xml
+++ b/entries/jQuery.get.xml
@@ -4,7 +4,7 @@
3.0
- A set of key/value pairs that configure the Ajax request. All properties except for url are optional. A default can be set for any option with $.ajaxSetup(). See jQuery.ajax( settings ) for a complete list of all settings. The type option will automatically be set to POST.
+ A set of key/value pairs that configure the Ajax request. All properties except for url are optional. A default can be set for any option with $.ajaxSetup(). See jQuery.ajax( settings ) for a complete list of all settings. The type option will automatically be set to GET.
From 0e02309cbd780a5ff1885ff68931e55ebedacc31 Mon Sep 17 00:00:00 2001
From: Arthur Verschaeve
Date: Sun, 1 Feb 2015 00:24:57 +0100
Subject: [PATCH 197/699] 1.11.48
---
package.json | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/package.json b/package.json
index 9521f6f8..99e2e45e 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.11.47",
+ "version": "1.11.48",
"homepage": "https://github.com/jquery/api.jquery.com",
"author": {
"name": "jQuery Foundation and other contributors"
From 91d4fa56916c7d5cf03296bd8c55e7bfc0b6bf3d Mon Sep 17 00:00:00 2001
From: Aurelio De Rosa
Date: Mon, 26 Jan 2015 17:09:07 +0000
Subject: [PATCH 198/699] jQuery.param: remove code in summary
Fixes gh-636
Closes gh-637
---
entries/jQuery.param.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/entries/jQuery.param.xml b/entries/jQuery.param.xml
index bc715497..468b6db9 100644
--- a/entries/jQuery.param.xml
+++ b/entries/jQuery.param.xml
@@ -22,7 +22,7 @@
A Boolean indicating whether to perform a traditional "shallow" serialization.
- Create a serialized representation of an array, a plain object, or a jQuery object suitable for use in a URL query string or Ajax request. In case a jQuery object is passed, it should contain <input> elements with name/value properties.
+ Create a serialized representation of an array, a plain object, or a jQuery object suitable for use in a URL query string or Ajax request. In case a jQuery object is passed, it should contain input elements with name/value properties.
This function is used internally to convert form element values into a serialized string representation (See .serialize() for more information).
As of jQuery 1.3, the return value of a function is used instead of the function as a String.
From 996e73b0fd0f0a6845e7f1054d7eb0174606f8f9 Mon Sep 17 00:00:00 2001
From: Arthur Verschaeve
Date: Sun, 1 Feb 2015 20:04:31 +0100
Subject: [PATCH 199/699] 1.11.49
---
package.json | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/package.json b/package.json
index 99e2e45e..a8c1981f 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.11.48",
+ "version": "1.11.49",
"homepage": "https://github.com/jquery/api.jquery.com",
"author": {
"name": "jQuery Foundation and other contributors"
From e82e9db30568ee50474e5d2251d19aa87d6e043d Mon Sep 17 00:00:00 2001
From: Arthur Verschaeve
Date: Wed, 28 Jan 2015 16:52:15 +0100
Subject: [PATCH 200/699] Unload: update examples using `alert()`
Fixes gh-388
Closes gh-639
---
entries/unload.xml | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a/entries/unload.xml b/entries/unload.xml
index e7c12492..e33dc639 100644
--- a/entries/unload.xml
+++ b/entries/unload.xml
@@ -28,18 +28,16 @@
Any unload event handler should be bound to the window object:
$( window ).unload(function() {
- alert( "Handler for .unload() called." );
+ return "Handler for .unload() called.";
});
-
After this code executes, the alert will be displayed whenever the browser leaves the current page.
-It is not possible to cancel the unload event with .preventDefault(). This event is available so that scripts can perform cleanup when the user leaves the page.
-
+
This event is available so that scripts can perform cleanup when the user leaves the page. Most browsers will ignore calls to alert(), confirm() and prompt() inside the event handler. The string you return may be used in a confirmation dialog, but not all browsers support this. It is not possible to cancel the unload event with .preventDefault().
To display an alert when a page is unloaded:
From 2213245a65baad50a0cf31023c8e0b84bf6ad6eb Mon Sep 17 00:00:00 2001
From: Arthur Verschaeve
Date: Mon, 2 Feb 2015 22:14:27 +0100
Subject: [PATCH 201/699] 1.11.50
---
package.json | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/package.json b/package.json
index a8c1981f..390c9b3d 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.11.49",
+ "version": "1.11.50",
"homepage": "https://github.com/jquery/api.jquery.com",
"author": {
"name": "jQuery Foundation and other contributors"
From 3cbcc98ce3e1185c72687e1949d1773280b78db6 Mon Sep 17 00:00:00 2001
From: Aurelio De Rosa
Date: Sun, 13 Jul 2014 16:10:29 +0100
Subject: [PATCH 202/699] css: document passing an empty string as a second
parameter
Closes gh-528
---
entries/css.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/entries/css.xml b/entries/css.xml
index 178fc326..1f441945 100644
--- a/entries/css.xml
+++ b/entries/css.xml
@@ -143,7 +143,7 @@ $( "div" ).click(function() {
As with the .prop() method, the .css() method makes setting properties of elements quick and easy. This method can take either a property name and value as separate parameters, or a single object of key-value pairs.
Also, jQuery can equally interpret the CSS and DOM formatting of multiple-word properties. For example, jQuery understands and returns the correct value for both .css({ "background-color": "#ffe", "border-left": "5px solid #ccc" }) and .css({backgroundColor: "#ffe", borderLeft: "5px solid #ccc" }). Notice that with the DOM notation, quotation marks around the property names are optional, but with CSS notation they're required due to the hyphen in the name.
-
When using .css() as a setter, jQuery modifies the element's style property. For example, $( "#mydiv" ).css( "color", "green" ) is equivalent to document.getElementById( "mydiv" ).style.color = "green". Setting the value of a style property to an empty string — e.g. $( "#mydiv" ).css( "color", "" ) — removes that property from an element if it has already been directly applied, whether in the HTML style attribute, through jQuery's .css() method, or through direct DOM manipulation of the style property. It does not, however, remove a style that has been applied with a CSS rule in a stylesheet or <style> element. Warning: one notable exception is that, for IE 8 and below, removing a shorthand property such as border or background will remove that style entirely from the element, regardless of what is set in a stylesheet or <style> element.
+
When using .css() as a setter, jQuery modifies the element's style property. For example, $( "#mydiv" ).css( "color", "green" ) is equivalent to document.getElementById( "mydiv" ).style.color = "green". Setting the value of a style property to an empty string — e.g. $( "#mydiv" ).css( "color", "" ) — removes that property from an element if it has already been directly applied, whether in the HTML style attribute, through jQuery's .css() method, or through direct DOM manipulation of the style property. As a consequence, the element's style for that property will be restored to whatever value was applied. So, this method can be used to cancel any style modification you have previously performed. It does not, however, remove a style that has been applied with a CSS rule in a stylesheet or <style> element. Warning: one notable exception is that, for IE 8 and below, removing a shorthand property such as border or background will remove that style entirely from the element, regardless of what is set in a stylesheet or <style> element.
As of jQuery 1.6, .css() accepts relative values similar to .animate(). Relative values are a string starting with += or -= to increment or decrement the current value. For example, if an element's padding-left was 10px, .css( "padding-left", "+=15" ) would result in a total padding-left of 25px.
As of jQuery 1.4, .css() allows us to pass a function as the property value:
From f348efd916559081f0acdcd0b55508ca680bd697 Mon Sep 17 00:00:00 2001
From: Arthur Verschaeve
Date: Tue, 3 Feb 2015 20:58:02 +0100
Subject: [PATCH 203/699] 1.11.51
---
package.json | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/package.json b/package.json
index 390c9b3d..ae302c92 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.11.50",
+ "version": "1.11.51",
"homepage": "https://github.com/jquery/api.jquery.com",
"author": {
"name": "jQuery Foundation and other contributors"
From b4b273fa0ca113037f8c42e26a117aea06dd3624 Mon Sep 17 00:00:00 2001
From: Aurelio De Rosa
Date: Thu, 5 Feb 2015 23:46:04 +0000
Subject: [PATCH 204/699] val: mention support for numbers
Fixes gh-624
Closes gh-645
---
entries/val.xml | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/entries/val.xml b/entries/val.xml
index 27cbc392..bb5f03e2 100644
--- a/entries/val.xml
+++ b/entries/val.xml
@@ -106,8 +106,9 @@ $( "input" )
1.0
+
- A string of text or an array of strings corresponding to the value of each matched element to set as selected/checked.
+ A string of text, a number, or an array of strings corresponding to the value of each matched element to set as selected/checked.
From fe4e1b848cf8f9ca58de36c40bada8f85575d9c9 Mon Sep 17 00:00:00 2001
From: Arthur Verschaeve
Date: Fri, 6 Feb 2015 07:18:34 +0100
Subject: [PATCH 205/699] 1.11.52
---
package.json | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/package.json b/package.json
index ae302c92..84c9e073 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.11.51",
+ "version": "1.11.52",
"homepage": "https://github.com/jquery/api.jquery.com",
"author": {
"name": "jQuery Foundation and other contributors"
From 3aeb4c237861831b0ddc5da3034e56f32f466e71 Mon Sep 17 00:00:00 2001
From: Ian MacIntosh
Date: Fri, 21 Nov 2014 11:30:25 -0500
Subject: [PATCH 206/699] jQuery.ajax: Add request status 'nocontent'
Closes gh-596
---
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 d7362cb2..af8c2cd7 100644
--- a/entries/jQuery.ajax.xml
+++ b/entries/jQuery.ajax.xml
@@ -32,7 +32,7 @@
- A function to be called when the request finishes (after success and error callbacks are executed). The function gets passed two arguments: The jqXHR (in jQuery 1.4.x, XMLHTTPRequest) object and a string categorizing the status of the request ("success", "notmodified", "error", "timeout", "abort", or "parsererror"). As of jQuery 1.5, the complete setting can accept an array of functions. Each function will be called in turn. This is an Ajax Event.
+ A function to be called when the request finishes (after success and error callbacks are executed). The function gets passed two arguments: The jqXHR (in jQuery 1.4.x, XMLHTTPRequest) object and a string categorizing the status of the request ("success", "notmodified", "nocontent", "error", "timeout", "abort", or "parsererror"). As of jQuery 1.5, the complete setting can accept an array of functions. Each function will be called in turn. This is an Ajax Event.An object of string/regular-expression pairs that determine how jQuery will parse the response, given its content type.
From 2ce5e66788612dcd7ee72ebc34119c6c2a968fd9 Mon Sep 17 00:00:00 2001
From: Arthur Verschaeve
Date: Fri, 6 Feb 2015 20:45:34 +0100
Subject: [PATCH 207/699] 1.11.53
---
package.json | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/package.json b/package.json
index 84c9e073..ec105d55 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.11.52",
+ "version": "1.11.53",
"homepage": "https://github.com/jquery/api.jquery.com",
"author": {
"name": "jQuery Foundation and other contributors"
From da211e93e0a9322c8853e45df76f18dfd77ce2b5 Mon Sep 17 00:00:00 2001
From: Arthur Verschaeve
Date: Tue, 6 Jan 2015 22:16:20 +0100
Subject: [PATCH 208/699] css: add info on automatic prefixing since 1.8
Fixes gh-339
Closes gh-621
---
entries/css.xml | 1 +
1 file changed, 1 insertion(+)
diff --git a/entries/css.xml b/entries/css.xml
index 1f441945..c2e0ae50 100644
--- a/entries/css.xml
+++ b/entries/css.xml
@@ -144,6 +144,7 @@ $( "div" ).click(function() {
As with the .prop() method, the .css() method makes setting properties of elements quick and easy. This method can take either a property name and value as separate parameters, or a single object of key-value pairs.
Also, jQuery can equally interpret the CSS and DOM formatting of multiple-word properties. For example, jQuery understands and returns the correct value for both .css({ "background-color": "#ffe", "border-left": "5px solid #ccc" }) and .css({backgroundColor: "#ffe", borderLeft: "5px solid #ccc" }). Notice that with the DOM notation, quotation marks around the property names are optional, but with CSS notation they're required due to the hyphen in the name.
When using .css() as a setter, jQuery modifies the element's style property. For example, $( "#mydiv" ).css( "color", "green" ) is equivalent to document.getElementById( "mydiv" ).style.color = "green". Setting the value of a style property to an empty string — e.g. $( "#mydiv" ).css( "color", "" ) — removes that property from an element if it has already been directly applied, whether in the HTML style attribute, through jQuery's .css() method, or through direct DOM manipulation of the style property. As a consequence, the element's style for that property will be restored to whatever value was applied. So, this method can be used to cancel any style modification you have previously performed. It does not, however, remove a style that has been applied with a CSS rule in a stylesheet or <style> element. Warning: one notable exception is that, for IE 8 and below, removing a shorthand property such as border or background will remove that style entirely from the element, regardless of what is set in a stylesheet or <style> element.
+
As of jQuery 1.8, the .css() setter will automatically take care of prefixing the property name. For example, take .css( "user-select", "none" ) in Chrome/Safari will set it as -webkit-user-select, Firefox will use -moz-user-select, and IE10 will use -ms-user-select.
As of jQuery 1.6, .css() accepts relative values similar to .animate(). Relative values are a string starting with += or -= to increment or decrement the current value. For example, if an element's padding-left was 10px, .css( "padding-left", "+=15" ) would result in a total padding-left of 25px.
As of jQuery 1.4, .css() allows us to pass a function as the property value:
From 8d907790537c98a0bd401b01725e2de78488384f Mon Sep 17 00:00:00 2001
From: Arthur Verschaeve
Date: Sat, 7 Feb 2015 09:44:08 +0100
Subject: [PATCH 209/699] 1.11.54
---
package.json | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/package.json b/package.json
index ec105d55..24c75964 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.11.53",
+ "version": "1.11.54",
"homepage": "https://github.com/jquery/api.jquery.com",
"author": {
"name": "jQuery Foundation and other contributors"
From 1fc9603a29a9d0f8f0fdcd7a03a6da68c5dc1ae7 Mon Sep 17 00:00:00 2001
From: Arthur Verschaeve
Date: Fri, 6 Feb 2015 20:01:09 +0100
Subject: [PATCH 210/699] css: clarify getter returns computed value
Fixes gh-326
Closes gh-646
---
entries/css.xml | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/entries/css.xml b/entries/css.xml
index c2e0ae50..7778699f 100644
--- a/entries/css.xml
+++ b/entries/css.xml
@@ -1,6 +1,6 @@
- Get the value of a style property for the first element in the set of matched elements or set one or more CSS properties for every matched element.
+ Get the value of a computed style property for the first element in the set of matched elements or set one or more CSS properties for every matched element..css()
@@ -17,7 +17,7 @@
Get the computed style properties for the first element in the set of matched elements.
-
The .css() method is a convenient way to get a style property from the first matched element, especially in light of the different ways browsers access most of those properties (the getComputedStyle() method in standards-based browsers versus the currentStyle and runtimeStyle properties in Internet Explorer) and the different terms browsers use for certain properties. For example, Internet Explorer's DOM implementation refers to the float property as styleFloat, while W3C standards-compliant browsers refer to it as cssFloat. For consistency, you can simply use "float", and jQuery will translate it to the correct value for each browser.
+
The .css() method is a convenient way to get a computed style property from the first matched element, especially in light of the different ways browsers access most of those properties (the getComputedStyle() method in standards-based browsers versus the currentStyle and runtimeStyle properties in Internet Explorer) and the different terms browsers use for certain properties. For example, Internet Explorer's DOM implementation refers to the float property as styleFloat, while W3C standards-compliant browsers refer to it as cssFloat. For consistency, you can simply use "float", and jQuery will translate it to the correct value for each browser.
Also, jQuery can equally interpret the CSS and DOM formatting of multiple-word properties. For example, jQuery understands and returns the correct value for both .css( "background-color" ) and .css( "backgroundColor" ).
Note that the computed style of an element may not be the same as the value specified for that element in a style sheet. For example, computed styles of dimensions are almost always pixels, but they can be specified as em, ex, px or % in a style sheet. Different browsers may return CSS color values that are logically but not textually equal, e.g., #FFF, #ffffff, and rgb(255,255,255).
Retrieval of shorthand CSS properties (e.g., margin, background, border), although functional with some browsers, is not guaranteed. For example, if you want to retrieve the rendered border-width, use: $( elem ).css( "borderTopWidth" ), $( elem ).css( "borderBottomWidth" ), and so on.
From 7eeea9584ead9339b2b56bc5ea0e2e0a71931be2 Mon Sep 17 00:00:00 2001
From: Arthur Verschaeve
Date: Sat, 7 Feb 2015 23:45:29 +0100
Subject: [PATCH 211/699] 1.11.55
---
package.json | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/package.json b/package.json
index 24c75964..10a7c84c 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.11.54",
+ "version": "1.11.55",
"homepage": "https://github.com/jquery/api.jquery.com",
"author": {
"name": "jQuery Foundation and other contributors"
From c64b9904930610da21710afac66be48fd87cef34 Mon Sep 17 00:00:00 2001
From: Arthur Verschaeve
Date: Sun, 8 Feb 2015 16:32:29 +0100
Subject: [PATCH 212/699] outerHeight: document the method as a setter
Closes gh-647
Ref gh-98
---
entries/outerHeight.xml | 62 +++++++++++++++++++++++++++++++++++++++++
1 file changed, 62 insertions(+)
diff --git a/entries/outerHeight.xml b/entries/outerHeight.xml
index 302de40d..38b8816d 100644
--- a/entries/outerHeight.xml
+++ b/entries/outerHeight.xml
@@ -1,4 +1,6 @@
+
+ Get the current computed height for the first element in the set of matched elements, including padding, border, and optionally margin. Returns a number (without "px") representation of the value or null if called on an empty set of elements..outerHeight()
@@ -41,3 +43,63 @@ $( "p:last" ).text(
+
+
+
+ 1.8.0
+
+
+
+ A number representing the number of pixels, or a number along with an optional unit of measure appended (as a string).
+
+
+
+ 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.
+
+
+ Set the CSS outer Height of each element in the set of matched elements.
+
+
When calling .outerHeight(value), the value can be either a string (number and unit) or a number. If only a number is provided for the value, jQuery assumes a pixel unit. If a string is provided, however, any valid CSS measurement may be used (such as 100px, 50%, or auto).
+
+
+
+ Change the outer height of each div the first time it is clicked (and change its color).
+
+
+ d
+
d
+
d
+
d
+
d
+]]>
+
+
+
+
+
+
+
+
From aaea07c7e885ffd7b65e7c8907784788001eaf8c Mon Sep 17 00:00:00 2001
From: Arthur Verschaeve
Date: Mon, 9 Feb 2015 17:41:57 +0100
Subject: [PATCH 213/699] 1.11.56
---
package.json | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/package.json b/package.json
index 10a7c84c..98c84f0c 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.11.55",
+ "version": "1.11.56",
"homepage": "https://github.com/jquery/api.jquery.com",
"author": {
"name": "jQuery Foundation and other contributors"
From 80d53f0433fabb30ea069d011e0587bf2b6bb180 Mon Sep 17 00:00:00 2001
From: Arthur Verschaeve
Date: Mon, 9 Feb 2015 21:42:10 +0100
Subject: [PATCH 214/699] outerWidth: document method as a setter
Fixes gh-98
Closes gh-648
---
entries/outerWidth.xml | 61 ++++++++++++++++++++++++++++++++++++++++++
1 file changed, 61 insertions(+)
diff --git a/entries/outerWidth.xml b/entries/outerWidth.xml
index d9cda5a7..f5ac7b0d 100644
--- a/entries/outerWidth.xml
+++ b/entries/outerWidth.xml
@@ -1,4 +1,6 @@
+
+ Get the current computed width for the first element in the set of matched elements, including padding and border..outerWidth()
@@ -42,3 +44,62 @@ $( "p:last" ).text(
+
+
+ 1.8.0
+
+
+
+ A number representing the number of pixels, or a number along with an optional unit of measure appended (as a string).
+
+
+
+ 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.
+
+
+ Set the CSS outer width of each element in the set of matched elements.
+
+
When calling .outerWidth(value), the value can be either a string (number and unit) or a number. If only a number is provided for the value, jQuery assumes a pixel unit. If a string is provided, however, any valid CSS measurement may be used (such as 100px, 50%, or auto).
+
+
+
+ Change the outer width of each div the first time it is clicked (and change its color).
+
+
+ d
+
d
+
d
+
d
+
d
+]]>
+
+
+
+
+
+
+
+
From 14d39448abfadfd2625090ec8cb47d32b15349e7 Mon Sep 17 00:00:00 2001
From: Arthur Verschaeve
Date: Tue, 10 Feb 2015 07:06:21 +0100
Subject: [PATCH 215/699] 1.11.57
---
package.json | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/package.json b/package.json
index 98c84f0c..ca407be9 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.11.56",
+ "version": "1.11.57",
"homepage": "https://github.com/jquery/api.jquery.com",
"author": {
"name": "jQuery Foundation and other contributors"
From fa97019e2d8a71b1d2dde1ec6ffe9263600f1e1c Mon Sep 17 00:00:00 2001
From: Arthur Verschaeve
Date: Tue, 10 Feb 2015 21:11:10 +0100
Subject: [PATCH 216/699] Types: add `progress` to list of methods on a Promise
Fixes gh-355
Closes gh-649
---
pages/Types.html | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pages/Types.html b/pages/Types.html
index c2b9d219..cd66dd4d 100644
--- a/pages/Types.html
+++ b/pages/Types.html
@@ -634,7 +634,7 @@
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.
Promise Object
-
This object provides a subset of the methods of the Deferred object (then, done, fail, always, pipe, and state) to prevent users from changing the state of the Deferred.
+
This object provides a subset of the methods of the Deferred object (then, done, fail, always, pipe, progress, and state) to prevent users from changing the state of the Deferred.
Callbacks Object
A multi-purpose object that provides a powerful way to manage callback lists. It supports adding, removing, firing, and disabling callbacks. The Callbacks object is created and returned by the $.Callbacks function and subsequently returned by most of that function's methods.
From 7ed6ab885d51af1f427d93118410f3d0f54d96bd Mon Sep 17 00:00:00 2001
From: Arthur Verschaeve
Date: Wed, 11 Feb 2015 07:01:52 +0100
Subject: [PATCH 217/699] 1.11.58
---
package.json | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/package.json b/package.json
index ca407be9..0c2c1e89 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.11.57",
+ "version": "1.11.58",
"homepage": "https://github.com/jquery/api.jquery.com",
"author": {
"name": "jQuery Foundation and other contributors"
From a6f6b373488782538bd6ff0905efb6a679e918cb Mon Sep 17 00:00:00 2001
From: Eric Mill
Date: Sun, 1 Feb 2015 22:24:37 -0500
Subject: [PATCH 218/699] All: replace protocol-relative URLs
Fixes gh-613
Closes gh-641
---
entries/jQuery.getScript.xml | 2 +-
entries/jQuery.noConflict.xml | 2 +-
entries2html.xsl | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/entries/jQuery.getScript.xml b/entries/jQuery.getScript.xml
index e36d021c..be884042 100644
--- a/entries/jQuery.getScript.xml
+++ b/entries/jQuery.getScript.xml
@@ -91,7 +91,7 @@ $.cachedScript( "ajax/test.js" ).done(function( script, textStatus ) {
Load the official jQuery Color Animation plugin dynamically and bind some color animations to occur once the new functionality is loaded. p" ).hide();
Before $.noConflict(true)
-
+
]]>
demo</title>
<style> </style>
- <script src="//code.jquery.com/jquery-1.10.2.js"></script>
+ <script src="https://code.jquery.com/jquery-1.10.2.js"></script>
<script>
</script>
From f19b0e08d6fb4331139901b986f51a07493302c5 Mon Sep 17 00:00:00 2001
From: Arthur Verschaeve
Date: Wed, 11 Feb 2015 20:12:38 +0100
Subject: [PATCH 219/699] 1.11.59
---
package.json | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/package.json b/package.json
index 0c2c1e89..ac3c3d0a 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.11.58",
+ "version": "1.11.59",
"homepage": "https://github.com/jquery/api.jquery.com",
"author": {
"name": "jQuery Foundation and other contributors"
From 56151463d9b68f010c70f081568349591b81b746 Mon Sep 17 00:00:00 2001
From: burka
Date: Mon, 16 Feb 2015 23:30:15 +0100
Subject: [PATCH 220/699] toggle: renamed toggle(showOrHide) to
toggle(setShown)
To make it clear that passing true shows and passing false hides. Otherwise if you take showOrHide at its word, it would do nothing if you pass false and would call the regular toggle() if you pass true ;-)
Closes gh-654
---
entries/toggle.xml | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/entries/toggle.xml b/entries/toggle.xml
index 76d95f42..8fe34ab7 100644
--- a/entries/toggle.xml
+++ b/entries/toggle.xml
@@ -24,8 +24,8 @@
1.3
-
- A Boolean indicating whether to show or hide the elements.
+
+ Use true to show the element or false to hide it.
@@ -75,13 +75,13 @@ $( "#clickme" ).click(function() {
The second version of the method accepts a Boolean parameter. If this parameter is true, then the matched elements are shown; if false, the elements are hidden. In essence, the statement:
From 6c6858c3c4016f6b44e471967ba72d5fafccef06 Mon Sep 17 00:00:00 2001
From: Corey Frang
Date: Tue, 17 Feb 2015 09:37:49 -0500
Subject: [PATCH 221/699] 1.11.60
---
package.json | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/package.json b/package.json
index ac3c3d0a..1c20ffa8 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.11.59",
+ "version": "1.11.60",
"homepage": "https://github.com/jquery/api.jquery.com",
"author": {
"name": "jQuery Foundation and other contributors"
From ce73bb3c3d0ed1b8dfb157b07ff2a3e48c09b2fa Mon Sep 17 00:00:00 2001
From: Arthur Verschaeve
Date: Wed, 18 Feb 2015 16:36:16 +0100
Subject: [PATCH 222/699] css: add note about `px` being the default unit
Fixes gh-656
Closes gh-657
---
entries/css.xml | 1 +
1 file changed, 1 insertion(+)
diff --git a/entries/css.xml b/entries/css.xml
index 7778699f..53ae097d 100644
--- a/entries/css.xml
+++ b/entries/css.xml
@@ -143,6 +143,7 @@ $( "div" ).click(function() {
As with the .prop() method, the .css() method makes setting properties of elements quick and easy. This method can take either a property name and value as separate parameters, or a single object of key-value pairs.
Also, jQuery can equally interpret the CSS and DOM formatting of multiple-word properties. For example, jQuery understands and returns the correct value for both .css({ "background-color": "#ffe", "border-left": "5px solid #ccc" }) and .css({backgroundColor: "#ffe", borderLeft: "5px solid #ccc" }). Notice that with the DOM notation, quotation marks around the property names are optional, but with CSS notation they're required due to the hyphen in the name.
+
When a number is passed as the value, jQuery will convert it to a string and add px to the end of that string. If the property requires units other than px, convert the value to a string and add the appropriate units before calling the method.
When using .css() as a setter, jQuery modifies the element's style property. For example, $( "#mydiv" ).css( "color", "green" ) is equivalent to document.getElementById( "mydiv" ).style.color = "green". Setting the value of a style property to an empty string — e.g. $( "#mydiv" ).css( "color", "" ) — removes that property from an element if it has already been directly applied, whether in the HTML style attribute, through jQuery's .css() method, or through direct DOM manipulation of the style property. As a consequence, the element's style for that property will be restored to whatever value was applied. So, this method can be used to cancel any style modification you have previously performed. It does not, however, remove a style that has been applied with a CSS rule in a stylesheet or <style> element. Warning: one notable exception is that, for IE 8 and below, removing a shorthand property such as border or background will remove that style entirely from the element, regardless of what is set in a stylesheet or <style> element.
As of jQuery 1.8, the .css() setter will automatically take care of prefixing the property name. For example, take .css( "user-select", "none" ) in Chrome/Safari will set it as -webkit-user-select, Firefox will use -moz-user-select, and IE10 will use -ms-user-select.
As of jQuery 1.6, .css() accepts relative values similar to .animate(). Relative values are a string starting with += or -= to increment or decrement the current value. For example, if an element's padding-left was 10px, .css( "padding-left", "+=15" ) would result in a total padding-left of 25px.
From f896bf48e8b0898f6f9d6692f70e182f9abf8729 Mon Sep 17 00:00:00 2001
From: Arthur Verschaeve
Date: Wed, 18 Feb 2015 17:16:39 +0100
Subject: [PATCH 223/699] 1.11.61
---
package.json | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/package.json b/package.json
index 1c20ffa8..ea142389 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.11.60",
+ "version": "1.11.61",
"homepage": "https://github.com/jquery/api.jquery.com",
"author": {
"name": "jQuery Foundation and other contributors"
From 94cf3d4975bf01b78af2cef88fa71ccdda86c8e5 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Scott=20Gonz=C3=A1lez?=
Date: Tue, 24 Feb 2015 10:07:54 -0500
Subject: [PATCH 224/699] Effects: Don't refer to objects as maps
Closes gh-664
---
includes/options-argument.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/includes/options-argument.xml b/includes/options-argument.xml
index 110456cd..f62a8585 100644
--- a/includes/options-argument.xml
+++ b/includes/options-argument.xml
@@ -15,7 +15,7 @@
- A map of one or more of the CSS properties defined by the properties argument and their corresponding easing functions.
+ An object containing one or more of the CSS properties defined by the properties argument and their corresponding easing functions.
From 241c51f4a1c6ada8054ac803f31e48348116b5ed Mon Sep 17 00:00:00 2001
From: Arthur Verschaeve
Date: Wed, 25 Feb 2015 13:38:11 +0100
Subject: [PATCH 225/699] 1.11.62
---
package.json | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/package.json b/package.json
index ea142389..4c8c48b8 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.11.61",
+ "version": "1.11.62",
"homepage": "https://github.com/jquery/api.jquery.com",
"author": {
"name": "jQuery Foundation and other contributors"
From 6ba2a3fb0e8583e223091a09c9f7644a1bded34f Mon Sep 17 00:00:00 2001
From: Arthur Verschaeve
Date: Mon, 23 Feb 2015 22:00:47 +0100
Subject: [PATCH 226/699] jQuery.extend: simplify way of logging objects
Fixes gh-658
Closes gh-661
---
entries/jQuery.extend.xml | 43 ++++++++-------------------------------
1 file changed, 8 insertions(+), 35 deletions(-)
diff --git a/entries/jQuery.extend.xml b/entries/jQuery.extend.xml
index 958e9d14..ee6fb4a7 100644
--- a/entries/jQuery.extend.xml
+++ b/entries/jQuery.extend.xml
@@ -56,17 +56,8 @@ var object2 = {
// Merge object2 into object1
$.extend( object1, object2 );
-var printObj = typeof JSON !== "undefined" ? JSON.stringify : function( obj ) {
- var arr = [];
- $.each( obj, function( key, val ) {
- var next = key + ": ";
- next += $.isPlainObject( val ) ? printObj( val ) : val;
- arr.push( next );
- });
- return "{ " + arr.join( ", " ) + " }";
-};
-
-$( "#log" ).append( printObj( object1 ) );
+// Assuming JSON.stringify - not available in IE<8
+$( "#log" ).append( JSON.stringify( object1 ) );
]]>
@@ -88,17 +79,8 @@ var object2 = {
// Merge object2 into object1, recursively
$.extend( true, object1, object2 );
-var printObj = typeof JSON !== "undefined" ? JSON.stringify : function( obj ) {
- var arr = [];
- $.each( obj, function( key, val ) {
- var next = key + ": ";
- next += $.isPlainObject( val ) ? printObj( val ) : val;
- arr.push( next );
- });
- return "{ " + arr.join( ", " ) + " }";
-};
-
-$( "#log" ).append( printObj( object1 ) );
+// Assuming JSON.stringify - not available in IE<8
+$( "#log" ).append( JSON.stringify( object1 ) );
]]>
@@ -113,19 +95,10 @@ var options = { validate: true, name: "bar" };
// Merge defaults and options, without modifying defaults
var settings = $.extend( {}, defaults, options );
-var printObj = typeof JSON !== "undefined" ? JSON.stringify : function( obj ) {
- var arr = [];
- $.each( obj, function( key, val ) {
- var next = key + ": ";
- next += $.isPlainObject( val ) ? printObj( val ) : val;
- arr.push( next );
- });
- return "{ " + arr.join( ", " ) + " }";
-};
-
-$( "#log" ).append( "
defaults -- " + printObj( defaults ) + "
" );
-$( "#log" ).append( "
options -- " + printObj( options ) + "
" );
-$( "#log" ).append( "
settings -- " + printObj( settings ) + "
" );
+// Assuming JSON.stringify - not available in IE<8
+$( "#log" ).append( "
defaults -- " + JSON.stringify( defaults ) + "
" );
+$( "#log" ).append( "
options -- " + JSON.stringify( options ) + "
" );
+$( "#log" ).append( "
settings -- " + JSON.stringify( settings ) + "
" );
]]>
From 9df96fb1a02a6e24a7f5a413b56a97704902358e Mon Sep 17 00:00:00 2001
From: Arthur Verschaeve
Date: Wed, 25 Feb 2015 14:08:08 +0100
Subject: [PATCH 227/699] toggle: rename toggle(setShown) to toggle(display)
Fixes gh-655
Closes gh-666
---
entries/toggle.xml | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/entries/toggle.xml b/entries/toggle.xml
index 8fe34ab7..87cc15ce 100644
--- a/entries/toggle.xml
+++ b/entries/toggle.xml
@@ -24,7 +24,7 @@
1.3
-
+ Use true to show the element or false to hide it.
@@ -75,13 +75,13 @@ $( "#clickme" ).click(function() {
The second version of the method accepts a Boolean parameter. If this parameter is true, then the matched elements are shown; if false, the elements are hidden. In essence, the statement:
From e196de1ce926b033de7b6f5a62df013f86b8807f Mon Sep 17 00:00:00 2001
From: Arthur Verschaeve
Date: Wed, 25 Feb 2015 14:38:45 +0100
Subject: [PATCH 228/699] 1.11.63
---
package.json | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/package.json b/package.json
index 4c8c48b8..372ec0f5 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.11.62",
+ "version": "1.11.63",
"homepage": "https://github.com/jquery/api.jquery.com",
"author": {
"name": "jQuery Foundation and other contributors"
From 19b38fb1b3c736403313a31ae1fdb80d1650d6ab Mon Sep 17 00:00:00 2001
From: Aurelio De Rosa
Date: Sat, 28 Feb 2015 23:29:08 +0000
Subject: [PATCH 229/699] data: Removed trailing space
Closes gh-672
---
entries/data.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/entries/data.xml b/entries/data.xml
index 944efa14..f54a229c 100644
--- a/entries/data.xml
+++ b/entries/data.xml
@@ -21,7 +21,7 @@
Store arbitrary data associated with the matched elements.
The .data() method allows us to attach data of any type to DOM elements in a way that is safe from circular references and therefore from memory leaks.
-
We can set several distinct values for a single element and retrieve them later:
+
We can set several distinct values for a single element and retrieve them later:
$( "body" ).data( "foo", 52 );
$( "body" ).data( "bar", { myType: "test", count: 40 } );
From 46bdad0e5d11d6925f7deb5c01f9c6841dce7fb6 Mon Sep 17 00:00:00 2001
From: Arthur Verschaeve
Date: Sun, 1 Mar 2015 11:56:34 +0100
Subject: [PATCH 230/699] css: add note about special meaning of mixed case
Fixes gh-357
Closes gh-674
---
entries/css.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/entries/css.xml b/entries/css.xml
index 53ae097d..e7a2891a 100644
--- a/entries/css.xml
+++ b/entries/css.xml
@@ -18,7 +18,7 @@
Get the computed style properties for the first element in the set of matched elements.
The .css() method is a convenient way to get a computed style property from the first matched element, especially in light of the different ways browsers access most of those properties (the getComputedStyle() method in standards-based browsers versus the currentStyle and runtimeStyle properties in Internet Explorer) and the different terms browsers use for certain properties. For example, Internet Explorer's DOM implementation refers to the float property as styleFloat, while W3C standards-compliant browsers refer to it as cssFloat. For consistency, you can simply use "float", and jQuery will translate it to the correct value for each browser.
-
Also, jQuery can equally interpret the CSS and DOM formatting of multiple-word properties. For example, jQuery understands and returns the correct value for both .css( "background-color" ) and .css( "backgroundColor" ).
+
Also, jQuery can equally interpret the CSS and DOM formatting of multiple-word properties. For example, jQuery understands and returns the correct value for both .css( "background-color" ) and .css( "backgroundColor" ). This means mixed case has a special meaning, .css( "WiDtH" ) won't do the same as .css( "width" ), for example.
Note that the computed style of an element may not be the same as the value specified for that element in a style sheet. For example, computed styles of dimensions are almost always pixels, but they can be specified as em, ex, px or % in a style sheet. Different browsers may return CSS color values that are logically but not textually equal, e.g., #FFF, #ffffff, and rgb(255,255,255).
Retrieval of shorthand CSS properties (e.g., margin, background, border), although functional with some browsers, is not guaranteed. For example, if you want to retrieve the rendered border-width, use: $( elem ).css( "borderTopWidth" ), $( elem ).css( "borderBottomWidth" ), and so on.
As of jQuery 1.9, passing an array of style properties to .css() will result in an object of property-value pairs. For example, to retrieve all four rendered border-width values, you could use $( elem ).css([ "borderTopWidth", "borderRightWidth", "borderBottomWidth", "borderLeftWidth" ]).
From 578de69a455656b63ad78ed161765532d89b7016 Mon Sep 17 00:00:00 2001
From: Arthur Verschaeve
Date: Sun, 1 Mar 2015 12:18:08 +0100
Subject: [PATCH 231/699] html: warn about using `.html()` to insert scripts
Fixes gh-618
Closes gh-675
---
entries/html.xml | 1 +
1 file changed, 1 insertion(+)
diff --git a/entries/html.xml b/entries/html.xml
index 0e9f9dcc..2fb32ea1 100644
--- a/entries/html.xml
+++ b/entries/html.xml
@@ -119,6 +119,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.
+
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.
From a2672e88a587b5e5004cb2f9bec03135f94043d7 Mon Sep 17 00:00:00 2001
From: Arthur Verschaeve
Date: Sun, 1 Mar 2015 20:32:42 +0100
Subject: [PATCH 232/699] 1.11.64
---
package.json | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/package.json b/package.json
index 372ec0f5..5083da11 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.11.63",
+ "version": "1.11.64",
"homepage": "https://github.com/jquery/api.jquery.com",
"author": {
"name": "jQuery Foundation and other contributors"
From b6fb719f93aa932dcb95424b98a8e9115d93a866 Mon Sep 17 00:00:00 2001
From: Arthur Verschaeve
Date: Mon, 23 Feb 2015 21:40:30 +0100
Subject: [PATCH 233/699] css: add note about retrieving styles for detached
elements
Fixes gh-653
Closes gh-660
---
entries/css.xml | 1 +
1 file changed, 1 insertion(+)
diff --git a/entries/css.xml b/entries/css.xml
index e7a2891a..8fe89b20 100644
--- a/entries/css.xml
+++ b/entries/css.xml
@@ -21,6 +21,7 @@
Also, jQuery can equally interpret the CSS and DOM formatting of multiple-word properties. For example, jQuery understands and returns the correct value for both .css( "background-color" ) and .css( "backgroundColor" ). This means mixed case has a special meaning, .css( "WiDtH" ) won't do the same as .css( "width" ), for example.
Note that the computed style of an element may not be the same as the value specified for that element in a style sheet. For example, computed styles of dimensions are almost always pixels, but they can be specified as em, ex, px or % in a style sheet. Different browsers may return CSS color values that are logically but not textually equal, e.g., #FFF, #ffffff, and rgb(255,255,255).
Retrieval of shorthand CSS properties (e.g., margin, background, border), although functional with some browsers, is not guaranteed. For example, if you want to retrieve the rendered border-width, use: $( elem ).css( "borderTopWidth" ), $( elem ).css( "borderBottomWidth" ), and so on.
+
An element should be connected to the DOM when calling .css() on it. If it isn't, jQuery may throw an error.
As of jQuery 1.9, passing an array of style properties to .css() will result in an object of property-value pairs. For example, to retrieve all four rendered border-width values, you could use $( elem ).css([ "borderTopWidth", "borderRightWidth", "borderBottomWidth", "borderLeftWidth" ]).
From be016ae1d0785684f469f03948d680c874734455 Mon Sep 17 00:00:00 2001
From: Arthur Verschaeve
Date: Mon, 2 Mar 2015 18:20:08 +0100
Subject: [PATCH 234/699] 1.11.65
---
package.json | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/package.json b/package.json
index 5083da11..6808cf77 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.11.64",
+ "version": "1.11.65",
"homepage": "https://github.com/jquery/api.jquery.com",
"author": {
"name": "jQuery Foundation and other contributors"
From 65ccd2d874532abca8e23f2174bf02d126f40046 Mon Sep 17 00:00:00 2001
From: Arthur Verschaeve
Date: Sun, 1 Mar 2015 15:45:49 +0100
Subject: [PATCH 235/699] README: fix link for getting xmllint and xsltproc
Fixes gh-668
Closes gh-676
---
README.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/README.md b/README.md
index 67260550..f720120c 100644
--- a/README.md
+++ b/README.md
@@ -9,7 +9,7 @@ To build and deploy your changes for previewing in a [`jquery-wp-content`](https
* [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 GnuWin32.
+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.
## Style Guidelines
From ce0cb62258f149f8758583952aa3483967a13c2b Mon Sep 17 00:00:00 2001
From: Arthur Verschaeve
Date: Wed, 4 Mar 2015 07:02:33 +0100
Subject: [PATCH 236/699] 1.11.66
---
package.json | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/package.json b/package.json
index 6808cf77..e369ba64 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.11.65",
+ "version": "1.11.66",
"homepage": "https://github.com/jquery/api.jquery.com",
"author": {
"name": "jQuery Foundation and other contributors"
From f161bb0f3cd79ba4d00920dbb170e94bda57d86e Mon Sep 17 00:00:00 2001
From: Aurelio De Rosa
Date: Sat, 28 Feb 2015 22:41:25 +0000
Subject: [PATCH 237/699] on: add note about removing a listener during the
event
Fixes gh-665
Closes gh-670
---
entries/on.xml | 15 +++++++++++++++
1 file changed, 15 insertions(+)
diff --git a/entries/on.xml b/entries/on.xml
index 0f2f9474..9a7e66ed 100644
--- a/entries/on.xml
+++ b/entries/on.xml
@@ -96,6 +96,21 @@ $( "button" ).on( "click", {
The focus and blur events are specified by the W3C to not bubble, but jQuery defines cross-browser focusin and focusout events that do bubble. When focus and blur are used to attach delegated event handlers, jQuery maps the names and delivers them as focusin and focusout respectively. For consistency and clarity, use the bubbling event type names.
In all browsers, the load, scroll, and error events (e.g., on an <img> element) do not bubble. In Internet Explorer 8 and lower, the paste and reset events do not bubble. Such events are not supported for use with delegation, but they can be used when the event handler is directly attached to the element generating the event.
The error event on the window object uses nonstandard arguments and return value conventions, so it is not supported by jQuery. Instead, assign a handler function directly to the window.onerror property.
+
The handler list for an element is set when the event is first delivered. Adding or removing event handlers on the current element won't take effect until the next time the event is handled. To prevent any further event handlers from executing on an element within an event handler, call event.stopImmediatePropagation(). This behavior goes against the W3C events specification. To better understand this case, consider the following code:
In the code above, handler2 will be executed anyway the first time even if it's removed using .off(). However, the handler will not be executed the following times the click event is triggered.
Display a paragraph's text in an alert when it is clicked:
From 2a93e015e81b8acd40357a094b2f6b036508a053 Mon Sep 17 00:00:00 2001
From: Arthur Verschaeve
Date: Fri, 6 Mar 2015 22:39:58 +0100
Subject: [PATCH 238/699] 1.11.67
---
package.json | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/package.json b/package.json
index e369ba64..c2afc6fd 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.11.66",
+ "version": "1.11.67",
"homepage": "https://github.com/jquery/api.jquery.com",
"author": {
"name": "jQuery Foundation and other contributors"
From ac8f3e1d1df5217f6e319aa624298fb92c5a2dee Mon Sep 17 00:00:00 2001
From: Chad Killingsworth
Date: Thu, 15 Jan 2015 10:41:01 -0600
Subject: [PATCH 239/699] Deferred: Refer to the method as a factory, not a
constructor.
Closes gh-625
---
entries/jQuery.Deferred.xml | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/entries/jQuery.Deferred.xml b/entries/jQuery.Deferred.xml
index fa9455c0..2884ad87 100644
--- a/entries/jQuery.Deferred.xml
+++ b/entries/jQuery.Deferred.xml
@@ -14,10 +14,10 @@
- A constructor function that returns a chainable utility object with methods to register multiple callbacks into callback queues, invoke callback queues, and relay the success or failure state of any synchronous or asynchronous function.
+ A factory function that returns a chainable utility object with methods to register multiple callbacks into callback queues, invoke callback queues, and relay the success or failure state of any synchronous or asynchronous function.
-
The jQuery.Deferred() constructor creates a new Deferred object. The new operator is optional.
-
The jQuery.Deferred method can be passed an optional function, which is called just before the constructor returns and is passed the constructed deferred object as both the this object and as the first argument to the function. The called function can attach callbacks using deferred.then(), for example.
+
The jQuery.Deferred() factory creates a new deferred object.
+
The jQuery.Deferred method can be passed an optional function, which is called just before the method returns and is passed the new deferred object as both the this object and as the first argument to the function. The called function can attach callbacks using deferred.then(), for example.
A Deferred object starts in the pending state. Any callbacks added to the object with deferred.then(), deferred.always(), deferred.done(), or deferred.fail() are queued to be executed later. Calling deferred.resolve() or deferred.resolveWith() transitions the Deferred into the resolved state and immediately executes any doneCallbacks that are set. Calling deferred.reject() or deferred.rejectWith() transitions the Deferred into the rejected state and immediately executes any failCallbacks that are set. Once the object has entered the resolved or rejected state, it stays in that state. Callbacks can still be added to the resolved or rejected Deferred — they will execute immediately.
Enhanced Callbacks with jQuery Deferred
From 6ce2c3a69f17a3822c1c65853789b757444b7875 Mon Sep 17 00:00:00 2001
From: Arthur Verschaeve
Date: Mon, 9 Mar 2015 07:09:38 +0100
Subject: [PATCH 240/699] 1.11.68
---
package.json | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/package.json b/package.json
index c2afc6fd..57b9de89 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.11.67",
+ "version": "1.11.68",
"homepage": "https://github.com/jquery/api.jquery.com",
"author": {
"name": "jQuery Foundation and other contributors"
From cc962b2c26ef717f5440aa20c7e6640a0c16d21a Mon Sep 17 00:00:00 2001
From: Aurelio De Rosa
Date: Sat, 28 Feb 2015 23:24:18 +0000
Subject: [PATCH 241/699] jQuery.ajax: add `method` option and update examples
to use it
Fixes gh-609
Closes gh-671
---
entries/jQuery.ajax.xml | 19 +++++++++++--------
1 file changed, 11 insertions(+), 8 deletions(-)
diff --git a/entries/jQuery.ajax.xml b/entries/jQuery.ajax.xml
index af8c2cd7..428108d4 100644
--- a/entries/jQuery.ajax.xml
+++ b/entries/jQuery.ajax.xml
@@ -8,7 +8,7 @@
A string containing the URL to which the request is sent.
- 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(). See jQuery.ajax( settings ) below for a complete list of all settings.
+ 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(). See jQuery.ajax( settings ) below for a complete list of all settings.
@@ -82,7 +82,7 @@ $.ajax({
- A function to be called if the request fails. The function receives three arguments: The jqXHR (in jQuery 1.4.x, XMLHttpRequest) object, a string describing the type of error that occurred and an optional exception object, if one occurred. Possible values for the second argument (besides null) are "timeout", "error", "abort", and "parsererror". When an HTTP error occurs, errorThrown receives the textual portion of the HTTP status, such as "Not Found" or "Internal Server Error." As of jQuery 1.5, the error setting can accept an array of functions. Each function will be called in turn. Note:This handler is not called for cross-domain script and cross-domain JSONP requests. This is an Ajax Event.
+ A function to be called if the request fails. The function receives three arguments: The jqXHR (in jQuery 1.4.x, XMLHttpRequest) object, a string describing the type of error that occurred and an optional exception object, if one occurred. Possible values for the second argument (besides null) are "timeout", "error", "abort", and "parsererror". When an HTTP error occurs, errorThrown receives the textual portion of the HTTP status, such as "Not Found" or "Internal Server Error." As of jQuery 1.5, the error setting can accept an array of functions. Each function will be called in turn. Note:This handler is not called for cross-domain script and cross-domain JSONP requests. This is an Ajax Event.Whether to trigger global Ajax event handlers for this request. The default is true. Set to false to prevent the global handlers like ajaxStart or ajaxStop from being triggered. This can be used to control various Ajax Events.
@@ -94,7 +94,7 @@ $.ajax({
Allow the request to be successful only if the response has changed since the last request. This is done by checking the Last-Modified header. Default value is false, ignoring the header. In jQuery 1.4 this technique also checks the 'etag' specified by the server to catch unmodified data.
- Allow the current environment to be recognized as "local," (e.g. the filesystem), even if jQuery does not recognize it as such by default. The following protocols are currently recognized as local: file, *-extension, and widget. If the isLocal setting needs modification, it is recommended to do so once in the $.ajaxSetup() method.
+ Allow the current environment to be recognized as "local," (e.g. the filesystem), even if jQuery does not recognize it as such by default. The following protocols are currently recognized as local: file, *-extension, and widget. If the isLocal setting needs modification, it is recommended to do so once in the $.ajaxSetup() method.Override the callback function name in a JSONP request. This value will be used instead of 'callback' in the 'callback=?' part of the query string in the url. So {jsonp:'onJSONPLoad'} would result in 'onJSONPLoad=?' passed to the server. As of jQuery 1.5, setting the jsonp option to false prevents jQuery from adding the "?callback" string to the URL or attempting to use "=?" for transformation. In this case, you should also explicitly set the jsonpCallback setting. For example, { jsonp: false, jsonpCallback: "callbackName" }
@@ -102,7 +102,10 @@ $.ajax({
- Specify the callback function name for a JSONP request. This value will be used instead of the random name automatically generated by jQuery. It is preferable to let jQuery generate a unique name as it'll make it easier to manage the requests and provide callbacks and error handling. You may want to specify the callback when you want to enable better browser caching of GET requests. As of jQuery 1.5, you can also use a function for this setting, in which case the value of jsonpCallback is set to the return value of that function.
+ Specify the callback function name for a JSONP request. This value will be used instead of the random name automatically generated by jQuery. It is preferable to let jQuery generate a unique name as it'll make it easier to manage the requests and provide callbacks and error handling. You may want to specify the callback when you want to enable better browser caching of GET requests. As of jQuery 1.5, you can also use a function for this setting, in which case the value of jsonpCallback is set to the return value of that function.
+
+
+ The HTTP method to use for the request (e.g. "POST", "GET", "PUT").A mime type to override the XHR mime type.
@@ -144,7 +147,7 @@ $.ajax({
Set this to true if you wish to use the traditional style of param serialization.
- The type of request to make (e.g. "POST", "GET", "PUT"); default is "GET".
+ An alias for method. You should use type if you're using versions of jQuery prior to 1.9.0. A string containing the URL to which the request is sent.
@@ -346,7 +349,7 @@ $.ajaxSetup({
Save some data to the server and notify the user once it's complete.Load and execute a JavaScript file.
Date: Mon, 9 Mar 2015 21:14:06 +0100
Subject: [PATCH 242/699] 1.11.69
---
package.json | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/package.json b/package.json
index 57b9de89..d58dae0e 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.11.68",
+ "version": "1.11.69",
"homepage": "https://github.com/jquery/api.jquery.com",
"author": {
"name": "jQuery Foundation and other contributors"
From 900c3ce12d4388b5a7f2b700d9a1895a3f267ef2 Mon Sep 17 00:00:00 2001
From: Evgeny Vereshchagin
Date: Thu, 26 Mar 2015 12:22:19 +0000
Subject: [PATCH 243/699] deferred.resolve(): Add note about promise
Make consistent with other methods like:
* `resolveWith`
* `notify`, `notifyWith`
* `reject`, `rejectWith`
Closes gh-681
---
entries/deferred.resolve.xml | 1 +
1 file changed, 1 insertion(+)
diff --git a/entries/deferred.resolve.xml b/entries/deferred.resolve.xml
index 8ed34680..3aea3599 100644
--- a/entries/deferred.resolve.xml
+++ b/entries/deferred.resolve.xml
@@ -11,6 +11,7 @@
Resolve a Deferred object and call any doneCallbacks with the given args.
+
Normally, only the creator of a Deferred should call this method; you can prevent other code from changing the Deferred's state by returning a restricted Promise object through deferred.promise().
When the Deferred is resolved, any doneCallbacks added by deferred.then() or deferred.done() are called. Callbacks are executed in the order they were added. Each callback is passed the args from the deferred.resolve(). Any doneCallbacks added after the Deferred enters the resolved state are executed immediately when they are added, using the arguments that were passed to the deferred.resolve() call. For more information, see the documentation for jQuery.Deferred().
From 2e73a313c2a66bfeb7481400a178e271c28d0362 Mon Sep 17 00:00:00 2001
From: Arthur Verschaeve
Date: Thu, 26 Mar 2015 14:04:44 +0100
Subject: [PATCH 244/699] 1.11.70
---
package.json | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/package.json b/package.json
index d58dae0e..9a17a4d8 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.11.69",
+ "version": "1.11.70",
"homepage": "https://github.com/jquery/api.jquery.com",
"author": {
"name": "jQuery Foundation and other contributors"
From 1f2d27ff76459385e6cf7bbeacfbfaa00f9731a9 Mon Sep 17 00:00:00 2001
From: Aurelio De Rosa
Date: Thu, 17 Jul 2014 13:50:43 +0100
Subject: [PATCH 245/699] attr: fix note about changing the `type` of an input
element in IE8 or older
Closes gh-533
---
entries/attr.xml | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/entries/attr.xml b/entries/attr.xml
index f0f1408b..203c61c8 100644
--- a/entries/attr.xml
+++ b/entries/attr.xml
@@ -20,9 +20,6 @@
Note: Attribute values are strings with the exception of a few attributes such as value and tabindex.
-
-
Note: Attempting to change the type attribute (or property) of an input element created via HTML or already in an HTML document will result in an error being thrown by Internet Explorer 6, 7, or 8.
-
As of jQuery 1.6, the .attr() method returns undefined for attributes that have not been set. To retrieve and change DOM properties such as the checked, selected, or disabled state of form elements, use the .prop() method.
Attributes vs. Properties
@@ -197,7 +194,9 @@ $( "#greatphoto" ).attr({
When setting multiple attributes, the quotes around attribute names are optional.
WARNING: When setting the 'class' attribute, you must always use quotes!
-
Note: jQuery prohibits changing the type attribute on an <input> or <button> element and will throw an error in all browsers. This is because the type attribute cannot be changed in Internet Explorer.
+
+
Note: Attempting to change the type attribute on an input or button element created via document.createElement() will throw an exception on Internet Explorer 8 or older.
+
Computed attribute values
By using a function to set attributes, you can compute the value based on other properties of the element. For example, to concatenate a new value with an existing value:
From 165bc3991a0150ec58dea238ee87608a3c23b151 Mon Sep 17 00:00:00 2001
From: Manuel Strehl
Date: Wed, 18 Mar 2015 21:36:13 +0100
Subject: [PATCH 246/699] siblings: explain that original elements might be
returned as well
Ref jquery/jquery#2149
Closes gh-678
---
entries/siblings.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/entries/siblings.xml b/entries/siblings.xml
index d6b1be02..cb9e6e0b 100644
--- a/entries/siblings.xml
+++ b/entries/siblings.xml
@@ -26,7 +26,7 @@
$( "li.third-item" ).siblings().css( "background-color", "red" );
The result of this call is a red background behind items 1, 2, 4, and 5. Since we do not supply a selector expression, all of the siblings are part of the object. If we had supplied one, only the matching items among these four would be included.
-
The original element is not included among the siblings, which is important to remember when we wish to find all elements at a particular level of the DOM tree.
+
The original element is not included among the siblings, which is important to remember when we wish to find all elements at a particular level of the DOM tree. However, if the original collection contains more than one element, they might be mutual siblings and will both be found. If you need an exclusive list of siblings, use $collection.siblings().not($collection).
Find the unique siblings of all yellow li elements in the 3 lists (including other yellow li elements if appropriate).
From a91102507b0ce390261791f92e32c7a2ea822dc0 Mon Sep 17 00:00:00 2001
From: Arthur Verschaeve
Date: Thu, 26 Mar 2015 14:37:54 +0100
Subject: [PATCH 247/699] 1.11.71
---
package.json | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/package.json b/package.json
index 9a17a4d8..49f3155e 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.11.70",
+ "version": "1.11.71",
"homepage": "https://github.com/jquery/api.jquery.com",
"author": {
"name": "jQuery Foundation and other contributors"
From 26006aaf79d093784924b614414f1458bbf6af7c Mon Sep 17 00:00:00 2001
From: Evgeny Vereshchagin
Date: Thu, 26 Mar 2015 14:13:22 +0000
Subject: [PATCH 248/699] jQuery.when: remove unnecessary `new` operator
This is more consistent with other entries.
Closes gh-683
---
entries/deferred.promise.xml | 2 +-
entries/jQuery.when.xml | 10 +++++-----
2 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/entries/deferred.promise.xml b/entries/deferred.promise.xml
index bcd18815..d2a4c12d 100644
--- a/entries/deferred.promise.xml
+++ b/entries/deferred.promise.xml
@@ -18,7 +18,7 @@
Create a Deferred and set two timer-based functions to either resolve or reject the Deferred after a random interval. Whichever one fires first "wins" and will call one of the callbacks. The second timeout has no effect since the Deferred is already complete (in a resolved or rejected state) from the first timeout action. Also set a timer-based progress notification function, and call a progress handler that adds "working..." to the document body.
In the case where multiple Deferred objects are passed to jQuery.when(), the method returns the Promise from a new "master" Deferred object that tracks the aggregate state of all the Deferreds it has been passed. The method will resolve its master Deferred as soon as all the Deferreds resolve, or reject the master Deferred as soon as one of the Deferreds is rejected. If the master Deferred is resolved, the doneCallbacks for the master Deferred are executed. The arguments passed to the doneCallbacks provide the resolved values for each of the Deferreds, and matches the order the Deferreds were passed to jQuery.when(). For example:
In the event a Deferred was resolved with no value, the corresponding doneCallback argument will be undefined. If a Deferred resolved to a single value, the corresponding argument will hold that value. In the case where a Deferred resolved to multiple values, the corresponding argument will be an array of those values. For example:
-var d1 = new $.Deferred();
-var d2 = new $.Deferred();
-var d3 = new $.Deferred();
+var d1 = $.Deferred();
+var d2 = $.Deferred();
+var d3 = $.Deferred();
$.when( d1, d2, d3 ).done(function ( v1, v2, v3 ) {
console.log( v1 ); // v1 is undefined
From 7163b8c260c8317c1f4718bff1519ad18cb31168 Mon Sep 17 00:00:00 2001
From: Arthur Verschaeve
Date: Fri, 27 Mar 2015 19:38:41 +0100
Subject: [PATCH 249/699] 1.11.72
---
package.json | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/package.json b/package.json
index 49f3155e..1c36c822 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.11.71",
+ "version": "1.11.72",
"homepage": "https://github.com/jquery/api.jquery.com",
"author": {
"name": "jQuery Foundation and other contributors"
From 86f1bf10cb54cb651ad2322f00639b87b6b2bc96 Mon Sep 17 00:00:00 2001
From: Arthur Verschaeve
Date: Fri, 27 Mar 2015 20:55:25 +0100
Subject: [PATCH 250/699] jQuery.when: passing no arguments returns a resolved
promise
Fixes gh-342
Closes gh-684
---
entries/jQuery.when.xml | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/entries/jQuery.when.xml b/entries/jQuery.when.xml
index 7e88f37d..7f053618 100644
--- a/entries/jQuery.when.xml
+++ b/entries/jQuery.when.xml
@@ -19,6 +19,12 @@ $.when( $.ajax( "test.aspx" ) ).then(function( data, textStatus, jqXHR ) {
If you don't pass it any arguments at all, jQuery.when() will return a resolved promise.
+
+$.when().then(function( x ) {
+ alert( "I fired immediately" );
});
In the case where multiple Deferred objects are passed to jQuery.when(), the method returns the Promise from a new "master" Deferred object that tracks the aggregate state of all the Deferreds it has been passed. The method will resolve its master Deferred as soon as all the Deferreds resolve, or reject the master Deferred as soon as one of the Deferreds is rejected. If the master Deferred is resolved, the doneCallbacks for the master Deferred are executed. The arguments passed to the doneCallbacks provide the resolved values for each of the Deferreds, and matches the order the Deferreds were passed to jQuery.when(). For example:
From b73cf4bb20d3fdfb55dfa03fb9ea951f0f3cf103 Mon Sep 17 00:00:00 2001
From: Arthur Verschaeve
Date: Fri, 27 Mar 2015 21:35:42 +0100
Subject: [PATCH 251/699] 1.11.73
---
package.json | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/package.json b/package.json
index 1c36c822..e4b490ff 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.11.72",
+ "version": "1.11.73",
"homepage": "https://github.com/jquery/api.jquery.com",
"author": {
"name": "jQuery Foundation and other contributors"
From b40db8ade7dd05de8e96d7048c3a5706edf8e428 Mon Sep 17 00:00:00 2001
From: Arthur Verschaeve
Date: Sat, 28 Mar 2015 14:46:54 +0100
Subject: [PATCH 252/699] appendTo/prependTo: correct note about appending
multiple elements
Fixes gh-318
Closes gh-687
---
entries/appendTo.xml | 2 +-
entries/prependTo.xml | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/entries/appendTo.xml b/entries/appendTo.xml
index f3e5da64..562b870d 100644
--- a/entries/appendTo.xml
+++ b/entries/appendTo.xml
@@ -53,7 +53,7 @@ $( "h2" ).appendTo( $( ".container" ) );
<h2>Greetings</h2>
</div>
-
If there is more than one target element, however, cloned copies of the inserted element will be created for each target after the first, and that new set (the original element plus clones) is returned.
+
If there is more than one target element, however, cloned copies of the inserted element will be created for each target except the last, and that new set (the original element plus clones) is returned.
Before jQuery 1.9, the append-to-single-element case did not create a new set, but instead returned the original set which made it difficult to use the .end() method reliably when being used with an unknown number of elements.
This code first retrieves the contents of <div class="container"> and then filters it for text nodes, which are wrapped in paragraph tags. This is accomplished by testing the .nodeType property of the element. This DOM property holds a numeric code indicating the node's type; text nodes use the code 3. The contents are again filtered, this time for <br /> elements, and these elements are removed.
+
This code first retrieves the contents of <div class="container"> and then filters it for text nodes, which are wrapped in paragraph tags. This is accomplished by testing the .nodeType property of the element. This DOM property holds a numeric code indicating the node's type; text nodes use the code 3. The contents are again filtered, this time for <br /> elements, and these elements are removed.
Find all the text nodes inside a paragraph and wrap them with a bold tag.
diff --git a/entries/delay.xml b/entries/delay.xml
index 94c9d83d..c94b2a0b 100644
--- a/entries/delay.xml
+++ b/entries/delay.xml
@@ -21,7 +21,7 @@ $( "#foo" ).slideUp( 300 ).delay( 800 ).fadeIn( 400 );
When this statement is executed, the element slides up for 300 milliseconds and then pauses for 800 milliseconds before fading in for 400 milliseconds.
- The .delay() method is best for delaying between queued jQuery effects. Because it is limited—it doesn't, for example, offer a way to cancel the delay—.delay() is not a replacement for JavaScript's native setTimeout function, which may be more appropriate for certain use cases.
+ The .delay() method is best for delaying between queued jQuery effects. Because it is limited—it doesn't, for example, offer a way to cancel the delay—.delay() is not a replacement for JavaScript's native setTimeout function, which may be more appropriate for certain use cases.
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.
-
To set the content of a <script> element, which does not contain HTML, use the .text() method and not .html().
+
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.
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.
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 428108d4..d7b49447 100644
--- a/entries/jQuery.ajax.xml
+++ b/entries/jQuery.ajax.xml
@@ -74,7 +74,7 @@ $.ajax({
The type of data that you're expecting back from the server. If none is specified, jQuery will try to infer it based on the MIME type of the response (an XML MIME type will yield XML, in 1.4 JSON will yield a JavaScript object, in 1.4 script will execute the script, and anything else will be returned as a string). The available types (and the result passed as the first argument to your success callback) are:
-
"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. 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.
+
"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. 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.
diff --git a/entries/odd-selector.xml b/entries/odd-selector.xml
index a2520812..12a75cb8 100644
--- a/entries/odd-selector.xml
+++ b/entries/odd-selector.xml
@@ -5,7 +5,7 @@
1.0
- Selects odd elements, zero-indexed. See also even.
+ Selects odd elements, zero-indexed. See also even.
In particular, note that the 0-based indexing means that, counter-intuitively, :odd selects the second element, fourth element, and so on within the matched set.
.triggerHandler( eventType ) executes all handlers bound with jQuery for the event type. It will also execute any method called on{eventType}() found on the element. The behavior of this method is similar to .trigger(), with the following exceptions:
+
.triggerHandler( eventType ) executes all handlers bound with jQuery for the event type. It will also execute any method called on{eventType}() found on the element. The behavior of this method is similar to .trigger(), with the following exceptions:
The .triggerHandler( "event" ) method will not call .event() on the element it is triggered on. This means .triggerHandler( "submit" ) on a form will not call .submit() on the form.
While .trigger() will operate on all elements matched by the jQuery object, .triggerHandler() only affects the first matched element.
diff --git a/entries/val.xml b/entries/val.xml
index bb5f03e2..184abdad 100644
--- a/entries/val.xml
+++ b/entries/val.xml
@@ -12,7 +12,7 @@
Get the current value of the first element in the set of matched elements.
The .val() method is primarily used to get the values of form elements such as input, select and textarea. In the case of select elements, it returns null when no option is selected and an array containing the value of each selected option when there is at least one and it is possible to select more because the multiple attribute is present.
-
For selects and checkboxes, you can also use the :selected and :checked selectors to get at values, for example:
+
For selects and checkboxes, you can also use the :selected and :checked selectors to get at values, for example:
// Get the value from a dropdown select
$( "select.foo option:selected").val();
diff --git a/pages/Types.html b/pages/Types.html
index cd66dd4d..422f6bd6 100644
--- a/pages/Types.html
+++ b/pages/Types.html
@@ -11,7 +11,7 @@
JavaScript provides several built-in datatypes. In addition to those, this page documents virtual types like Selectors, enhanced pseudo-types like Events and all and everything you wanted to know about Functions.
-
You should be able to try out most of the examples below by just copying them to your browser's JavaScript Console (Chrome, Safari with Develop menu activated, IE 8+) or Firebug console (Firefox).
+
You should be able to try out most of the examples below by just copying them to your browser's JavaScript Console (Chrome, Safari with Develop menu activated, IE 8+) or Firebug console (Firefox).
Whenever an example mentions that a type defaults to a boolean value, the result is good to know when using that type in a boolean context:
@@ -296,7 +296,7 @@
Iteration
alert( "key is " + [ key ] + ", value is " + obj[ key ] );
}
-
Note that for-in-loop can be spoiled by extending Object.prototype (see Object.prototype is verboten) so take care when using other libraries.
+
Note that for-in-loop can be spoiled by extending Object.prototype (see Object.prototype is verboten) so take care when using other libraries.
jQuery provides a generic each function to iterate over properties of objects, as well as elements of arrays:
@@ -412,7 +412,7 @@
Array<Type> Notation
This indicates that the method doesn't only expect an array as the argument, but also specifies the expected type. The notation is borrowed from Java 5's generics notation (or C++ templates).
PlainObject
-
The PlainObject type is a JavaScript object containing zero or more key-value pairs. The plain object is, in other words, an Object object. It is designated "plain" in jQuery documentation to distinguish it from other kinds of JavaScript objects: for example, null, user-defined arrays, and host objects such as document, all of which have a typeof value of "object." The jQuery.isPlainObject() method identifies whether the passed argument is a plain object or not, as demonstrated below:
+
The PlainObject type is a JavaScript object containing zero or more key-value pairs. The plain object is, in other words, an Object object. It is designated "plain" in jQuery documentation to distinguish it from other kinds of JavaScript objects: for example, null, user-defined arrays, and host objects such as document, all of which have a typeof value of "object." The jQuery.isPlainObject() method identifies whether the passed argument is a plain object or not, as demonstrated below:
A document object created by the browser's XML DOM parser, usually from a string representing XML. XML documents have different semantics than HTML documents, but most of the traversing and manipulation methods provided by jQuery will work with them.
From 1d5f56a09a5f23e29bdb2a2a7986cfa0ad8db7cb Mon Sep 17 00:00:00 2001
From: Arthur Verschaeve
Date: Sun, 29 Mar 2015 14:56:27 +0200
Subject: [PATCH 255/699] 1.11.75
---
package.json | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/package.json b/package.json
index e7149716..ea1c4f94 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.11.74",
+ "version": "1.11.75",
"homepage": "https://github.com/jquery/api.jquery.com",
"author": {
"name": "jQuery Foundation and other contributors"
From e0fac2acfadd0d0f41ca88f43fa9ed23854755cc Mon Sep 17 00:00:00 2001
From: Arthur Verschaeve
Date: Thu, 26 Mar 2015 15:01:21 +0100
Subject: [PATCH 256/699] hidden/visible-selector: add note about performance
Fixes gh-679
Closes gh-682
---
entries/hidden-selector.xml | 1 +
entries/visible-selector.xml | 1 +
notes.xsl | 3 +++
3 files changed, 5 insertions(+)
diff --git a/entries/hidden-selector.xml b/entries/hidden-selector.xml
index 2daf20e6..6712c736 100644
--- a/entries/hidden-selector.xml
+++ b/entries/hidden-selector.xml
@@ -20,6 +20,7 @@
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.
+ Shows all hidden divs and counts hidden inputs.How :visible is calculated was changed in jQuery 1.3.2. The release notes outline the changes in more detail.
+ Make all visible divs turn yellow on click.
By design, any jQuery constructor or method that accepts an HTML string — jQuery(), .append(), .after(), etc. — can potentially execute code. This can occur by injection of script tags or use of HTML attributes that execute code (for example, <img onload="">). Do not use these methods to insert strings obtained from untrusted sources such as URL query parameters, cookies, or form inputs. Doing so can introduce cross-site-scripting (XSS) vulnerabilities. Remove or escape any user input before adding content to the document.
+
+ Using this selector heavily can have performance implications, as it may force the browser to re-render the page before it can determine visibility. Tracking the visibility of elements via other methods, using a class for example, can provide better performance.
+
From 52920dc3973f7bbcf78971a2c01173b7f7e39361 Mon Sep 17 00:00:00 2001
From: Arthur Verschaeve
Date: Sun, 29 Mar 2015 14:59:58 +0200
Subject: [PATCH 257/699] 1.11.76
---
package.json | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/package.json b/package.json
index ea1c4f94..8d27acf4 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.11.75",
+ "version": "1.11.76",
"homepage": "https://github.com/jquery/api.jquery.com",
"author": {
"name": "jQuery Foundation and other contributors"
From 06fcf33200da10056b5e78ba58ca3b93f28257b4 Mon Sep 17 00:00:00 2001
From: Arthur Verschaeve
Date: Fri, 27 Mar 2015 21:13:43 +0100
Subject: [PATCH 258/699] jQuery.parseHTML: add note about leading/trailing
text nodes
Fixes gh-462
Closes gh-685
---
entries/jQuery.parseHTML.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/entries/jQuery.parseHTML.xml b/entries/jQuery.parseHTML.xml
index b0d245e6..06f59937 100644
--- a/entries/jQuery.parseHTML.xml
+++ b/entries/jQuery.parseHTML.xml
@@ -15,7 +15,7 @@
-
jQuery.parseHTML uses a native DOM element creation function to convert the string to a set of DOM elements, which can then be inserted into the document.
+
jQuery.parseHTML uses native methods to convert the string to a set of DOM nodes, which can then be inserted into the document. These methods do render all trailing or leading text (even if that's just whitespace). To prevent trailing/leading whitespace from being converted to text nodes you can pass the HTML string through jQuery.trim.
By default, the context is the current document if not specified or given as null or undefined. If the HTML was to be used in another document such as an iframe, that frame's document could be used.
Security Considerations
Most jQuery APIs that accept HTML strings will run scripts that are included in the HTML. jQuery.parseHTML does not run script in the parsed HTML unless keepScripts is explicitly true. However, it is still possible in most environments to execute script indirectly, for example via the <img onerror> attribute. The caller should be aware of this and guard against it by cleaning or escaping any untrusted inputs from sources such as the URL or cookies. For future compatibility, callers should not depend on the ability to run any script content when keepScripts is unspecified or false.
From e84239c26b2cee444ce25e6795f01fa487325b12 Mon Sep 17 00:00:00 2001
From: Arthur Verschaeve
Date: Tue, 31 Mar 2015 17:15:42 +0200
Subject: [PATCH 259/699] 1.11.77
---
package.json | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/package.json b/package.json
index 8d27acf4..322ee085 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.11.76",
+ "version": "1.11.77",
"homepage": "https://github.com/jquery/api.jquery.com",
"author": {
"name": "jQuery Foundation and other contributors"
From 1b2f86aa1984584fcbdb7dab6bc08c641813b8e4 Mon Sep 17 00:00:00 2001
From: Arthur Verschaeve
Date: Tue, 31 Mar 2015 16:46:29 +0200
Subject: [PATCH 260/699] triggerHandler: add signature for `.triggerHandler(
event, extra )`
Fixes gh-393
Closes gh-690
---
entries/triggerHandler.xml | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/entries/triggerHandler.xml b/entries/triggerHandler.xml
index ac6c34ba..d72516a8 100644
--- a/entries/triggerHandler.xml
+++ b/entries/triggerHandler.xml
@@ -13,6 +13,17 @@
Additional parameters to pass along to the event handler.
+
+ 1.3
+
+ A jQuery.Event object.
+
+
+
+
+ Additional parameters to pass along to the event handler.
+
+
.triggerHandler( eventType ) executes all handlers bound with jQuery for the event type. It will also execute any method called on{eventType}() found on the element. The behavior of this method is similar to .trigger(), with the following exceptions:
By default, jQuery adds a "px" unit to the values passed to the .css() method. This behavior can be prevented by adding the property to the jQuery.cssNumber object
+
By default, jQuery adds a "px" unit to the values passed to the .css() method. This behavior can be prevented by adding the property to the jQuery.cssNumber object
$.cssNumber.someCSSProp = true;
diff --git a/entries/jQuery.cssNumber.xml b/entries/jQuery.cssNumber.xml
new file mode 100644
index 00000000..ce5af886
--- /dev/null
+++ b/entries/jQuery.cssNumber.xml
@@ -0,0 +1,33 @@
+
+
+ jQuery.cssNumber
+
+ 1.4.3
+
+ An object containing all CSS properties that may be used without a unit. The .css() method uses this object to see if it may append px to unitless values.
+
+
You can think about jQuery.cssNumber as a list of all CSS properties you might use without a unit. It's used by .css() to determine if it needs to add px to unitless values.
+
The keys of the jQuery.cssNumber object are camel-cased and the values are all set to true. If you want to prevent the .css() method from automatically adding the px unit for a specific CSS property, you can add an extra property to the jQuery.cssNumber object.
+
+jQuery.cssNumber.someCSSProp = true;
+
+
By default the object contains the following properties:
+
+
zIndex
+
fontWeight
+
opacity
+
zoom
+
lineHeight
+
widows (added in jQuery 1.6)
+
orphans (added in jQuery 1.6)
+
fillOpacity (added in jQuery 1.6.2)
+
columnCount (added in jQuery 1.9)
+
order (added in jQuery 1.10.2)
+
flexGrow (added in jQuery 1.11.1)
+
flexShrink (added in jQuery 1.11.1)
+
+
+
+
+
+
From 3b2f209c4b296781fa0e4f778cc0cb611e72c638 Mon Sep 17 00:00:00 2001
From: Arthur Verschaeve
Date: Thu, 2 Apr 2015 19:50:11 +0200
Subject: [PATCH 263/699] 1.11.79
---
package.json | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/package.json b/package.json
index 159c7d10..1f11b9f9 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.11.78",
+ "version": "1.11.79",
"homepage": "https://github.com/jquery/api.jquery.com",
"author": {
"name": "jQuery Foundation and other contributors"
From 043079ed01671d2893fd8a412143391f4a13b43a Mon Sep 17 00:00:00 2001
From: Aurelio De Rosa
Date: Sun, 5 Apr 2015 15:22:04 +0100
Subject: [PATCH 264/699] addClass: Minor description improvement
Closes gh-697
---
entries/addClass.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/entries/addClass.xml b/entries/addClass.xml
index 238d03e5..476251d8 100644
--- a/entries/addClass.xml
+++ b/entries/addClass.xml
@@ -16,7 +16,7 @@
- Adds the specified class(es) to each of the set of matched elements.
+ Adds the specified class(es) to each element in the set of matched elements.
It's important to note that this method does not replace a class. It simply adds the class, appending it to any which may already be assigned to the elements.
More than one class may be added at a time, separated by a space, to the set of matched elements, like so:
From 55d856827e27b58c28a3b878062cc19d571e55d2 Mon Sep 17 00:00:00 2001
From: Arthur Verschaeve
Date: Sun, 5 Apr 2015 16:23:55 +0200
Subject: [PATCH 265/699] 1.11.80
---
package.json | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/package.json b/package.json
index 1f11b9f9..c1e60b7e 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.11.79",
+ "version": "1.11.80",
"homepage": "https://github.com/jquery/api.jquery.com",
"author": {
"name": "jQuery Foundation and other contributors"
From 626b12bcaff2aa97513755cf1f4aba1563134f38 Mon Sep 17 00:00:00 2001
From: Eric Atienza
Date: Mon, 6 Apr 2015 10:40:18 +0200
Subject: [PATCH 266/699] deferred.progress: Clarify that the second argument
is optional
Closes gh-694
---
entries/deferred.progress.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/entries/deferred.progress.xml b/entries/deferred.progress.xml
index 3a827a24..d1f18cc7 100644
--- a/entries/deferred.progress.xml
+++ b/entries/deferred.progress.xml
@@ -10,7 +10,7 @@
A function, or array of functions, to be called when the Deferred generates progress notifications.
-
+
From 36ebfed0363d9acc742dd4255872fbeb50abb5d1 Mon Sep 17 00:00:00 2001
From: Arthur Verschaeve
Date: Mon, 6 Apr 2015 10:51:21 +0200
Subject: [PATCH 267/699] 1.11.81
---
package.json | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/package.json b/package.json
index c1e60b7e..1e29dc72 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.11.80",
+ "version": "1.11.81",
"homepage": "https://github.com/jquery/api.jquery.com",
"author": {
"name": "jQuery Foundation and other contributors"
From a5faca00164c88eb6dd45d55fdd0c0721b38fd01 Mon Sep 17 00:00:00 2001
From: Arthur Verschaeve
Date: Mon, 6 Apr 2015 10:57:30 +0200
Subject: [PATCH 268/699] Wrap: Clarify that passing a collection uses the
first element
Fixes gh-698
Closes gh-700
---
entries/wrap.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/entries/wrap.xml b/entries/wrap.xml
index 02bce46c..1cd67a04 100644
--- a/entries/wrap.xml
+++ b/entries/wrap.xml
@@ -8,7 +8,7 @@
- A selector, element, HTML string, or jQuery object specifying the structure to wrap around the matched elements.
+ A selector, element, HTML string, or jQuery object specifying the structure to wrap around the matched elements. When you pass a jQuery collection containing more than one element the first element will be used.
From e31c339f3e675b100470421280970b5eee81bbc9 Mon Sep 17 00:00:00 2001
From: Arthur Verschaeve
Date: Mon, 6 Apr 2015 15:32:42 +0200
Subject: [PATCH 269/699] 1.11.82
---
package.json | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/package.json b/package.json
index 1e29dc72..a2c4d4c8 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.11.81",
+ "version": "1.11.82",
"homepage": "https://github.com/jquery/api.jquery.com",
"author": {
"name": "jQuery Foundation and other contributors"
From 0a4b6fb89fac9d217a31d45681428e56d1ed0661 Mon Sep 17 00:00:00 2001
From: Aurelio De Rosa
Date: Sun, 5 Apr 2015 23:18:33 +0100
Subject: [PATCH 270/699] wrapAll: Update return type of callback function
The return value of the the callback function can be a jQuery object
as well. This is the same as `wrap()`.
Closes gh-699
---
entries/wrapAll.xml | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/entries/wrapAll.xml b/entries/wrapAll.xml
index 80112ca0..c6dc02ca 100644
--- a/entries/wrapAll.xml
+++ b/entries/wrapAll.xml
@@ -14,9 +14,12 @@
1.4
- A function that returns a structure to wrap around the matched elements. Receives the index position of the element in the set as an argument. Within the function, this refers to the current element in the set.
+ A callback function returning the HTML content or jQuery object to wrap around the matched elements. Receives the index position of the element in the set as an argument. Within the function, this refers to the current element in the set.
-
+
+
+
+ Wrap an HTML structure around all elements in the set of matched elements.
From d289cf47165e4371953b498322cbb87863b94175 Mon Sep 17 00:00:00 2001
From: Arthur Verschaeve
Date: Mon, 6 Apr 2015 15:42:54 +0200
Subject: [PATCH 271/699] Wrap: correction to note about multiple elements
Ref gh-700
Closes gh-701
---
entries/wrap.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/entries/wrap.xml b/entries/wrap.xml
index 1cd67a04..d6258d70 100644
--- a/entries/wrap.xml
+++ b/entries/wrap.xml
@@ -8,7 +8,7 @@
- A selector, element, HTML string, or jQuery object specifying the structure to wrap around the matched elements. When you pass a jQuery collection containing more than one element the first element will be used.
+ A selector, element, HTML string, or jQuery object specifying the structure to wrap around the matched elements. When you pass a jQuery collection containing more than one element, or a selector matching more than one element, the first element will be used.
From eefe1720ed78f5d85c21fb2edde5cffb5b2e3e8f Mon Sep 17 00:00:00 2001
From: Eric Lee Carraway
Date: Mon, 6 Apr 2015 16:58:51 -0500
Subject: [PATCH 272/699] Ajax Events: Fix space before a comma
Closes gh-704
---
pages/Ajax_Events.html | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pages/Ajax_Events.html b/pages/Ajax_Events.html
index 9ba25ff7..26a59f0f 100644
--- a/pages/Ajax_Events.html
+++ b/pages/Ajax_Events.html
@@ -33,7 +33,7 @@
Global Events
});
Events
-
This is the full list of Ajax events , and in the order in which they are triggered. The indented events are triggered for each and every Ajax request (unless a global option has been set). The ajaxStart and ajaxStop events are events that relate to all Ajax requests together.
+
This is the full list of Ajax events, and in the order in which they are triggered. The indented events are triggered for each and every Ajax request (unless a global option has been set). The ajaxStart and ajaxStop events are events that relate to all Ajax requests together.
ajaxStart (Global Event) This event is triggered if an Ajax request is started and no other Ajax requests are currently running.
From 2c4233f3eaaa9c38ee10967b1ce56da823f239d7 Mon Sep 17 00:00:00 2001
From: Arthur Verschaeve
Date: Tue, 7 Apr 2015 09:30:59 +0200
Subject: [PATCH 273/699] 1.11.83
---
package.json | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/package.json b/package.json
index a2c4d4c8..6c18d258 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.11.82",
+ "version": "1.11.83",
"homepage": "https://github.com/jquery/api.jquery.com",
"author": {
"name": "jQuery Foundation and other contributors"
From bad3340c8335505516f26f93ee8aaa0b72b75a18 Mon Sep 17 00:00:00 2001
From: Eric Lee Carraway
Date: Tue, 7 Apr 2015 18:23:01 -0500
Subject: [PATCH 274/699] callbacks.fire: add a missing period
Closes gh-706
---
entries/callbacks.fire.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/entries/callbacks.fire.xml b/entries/callbacks.fire.xml
index 00ec03f3..daae9b1f 100644
--- a/entries/callbacks.fire.xml
+++ b/entries/callbacks.fire.xml
@@ -7,7 +7,7 @@
The argument or list of arguments to pass back to the callback list.
- Call all of the callbacks with the given arguments
+ Call all of the callbacks with the given arguments.
This method returns the Callbacks object onto which it is attached (this).
From d622e1244802cd55670265698f0d66383e3dedaa Mon Sep 17 00:00:00 2001
From: Eric Lee Carraway
Date: Tue, 7 Apr 2015 18:13:18 -0500
Subject: [PATCH 275/699] jQuery.isFunction: capitalize S in JavaScript
Closes gh-705
---
entries/jQuery.isFunction.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/entries/jQuery.isFunction.xml b/entries/jQuery.isFunction.xml
index 2ceed224..689cdbf7 100644
--- a/entries/jQuery.isFunction.xml
+++ b/entries/jQuery.isFunction.xml
@@ -7,7 +7,7 @@
Object to test whether or not it is a function.
- Determine if the argument passed is a Javascript function object.
+ Determine if the argument passed is a JavaScript function object.
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 89d7028945cbf9a5898b8c986d9a7be1254ea2fb Mon Sep 17 00:00:00 2001
From: Arthur Verschaeve
Date: Thu, 9 Apr 2015 12:55:36 +0200
Subject: [PATCH 278/699] 1.11.85
---
package.json | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/package.json b/package.json
index 7085f9f6..3b924585 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.11.84",
+ "version": "1.11.85",
"homepage": "https://github.com/jquery/api.jquery.com",
"author": {
"name": "jQuery Foundation and other contributors"
From 9f29995d4a2ba064f34474f627d96c867858f25c Mon Sep 17 00:00:00 2001
From: Arthur Verschaeve
Date: Tue, 31 Mar 2015 13:27:26 +0200
Subject: [PATCH 279/699] jQuery.get: note required callback arg if `dataType`
is provided
Fixes gh-351
Closes gh-691
---
entries/jQuery.get.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/entries/jQuery.get.xml b/entries/jQuery.get.xml
index aefc58fa..51b50c64 100644
--- a/entries/jQuery.get.xml
+++ b/entries/jQuery.get.xml
@@ -21,7 +21,7 @@
- A callback function that is executed if the request succeeds.
+ A callback function that is executed if the request succeeds. Required if dataType is provided, but you can use null or jQuery.noop as a placeholder.The type of data expected from the server. Default: Intelligent Guess (xml, json, script, or html).
From 8517c54ce71cd59ce388a9914320d791886ddbcc Mon Sep 17 00:00:00 2001
From: Arthur Verschaeve
Date: Thu, 9 Apr 2015 14:14:16 +0200
Subject: [PATCH 280/699] 1.11.86
---
package.json | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/package.json b/package.json
index 3b924585..00081c82 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.11.85",
+ "version": "1.11.86",
"homepage": "https://github.com/jquery/api.jquery.com",
"author": {
"name": "jQuery Foundation and other contributors"
From a10fe84a0fde13164a87132e87938d6a55311d02 Mon Sep 17 00:00:00 2001
From: Eric Atienza
Date: Mon, 6 Apr 2015 18:54:14 +0200
Subject: [PATCH 281/699] innerWidth: use `Number` return type
Closes gh-703
---
entries/innerWidth.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/entries/innerWidth.xml b/entries/innerWidth.xml
index 3356884d..a04640d4 100644
--- a/entries/innerWidth.xml
+++ b/entries/innerWidth.xml
@@ -1,7 +1,7 @@
Get the current computed inner width (including padding but not border) for the first element in the set of matched elements or set the inner width of every matched element.
-
+.innerWidth()1.2.6
From c214dd395a7f9b73f892cec0e147a528f8f5a8e6 Mon Sep 17 00:00:00 2001
From: Arthur Verschaeve
Date: Thu, 9 Apr 2015 19:11:13 +0200
Subject: [PATCH 282/699] 1.11.87
---
package.json | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/package.json b/package.json
index 00081c82..982763b4 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.11.86",
+ "version": "1.11.87",
"homepage": "https://github.com/jquery/api.jquery.com",
"author": {
"name": "jQuery Foundation and other contributors"
From 14060437b8e6eae97b2fcb726c7afcb228d4a9e8 Mon Sep 17 00:00:00 2001
From: Aurelio De Rosa
Date: Sat, 11 Apr 2015 17:31:37 +0100
Subject: [PATCH 283/699] jQuery.ajax: Fixed a typo
Closes gh-713
---
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 d7b49447..51bdb838 100644
--- a/entries/jQuery.ajax.xml
+++ b/entries/jQuery.ajax.xml
@@ -43,7 +43,7 @@
When sending data to the server, use this content type. Default is "application/x-www-form-urlencoded; charset=UTF-8", which is fine for most cases. If you explicitly pass in a content-type to $.ajax(), then it is always sent to the server (even if no data is sent). As of jQuery 1.6 you can pass false to tell jQuery to not set any content type header. Note: The W3C XMLHttpRequest specification dictates that the charset is always UTF-8; specifying another charset will not force the browser to change the encoding. Note: For cross-domain requests, setting the content type to anything other than application/x-www-form-urlencoded, multipart/form-data, or text/plain will trigger the browser to send a preflight OPTIONS request to the server.
- This object will be the context of all Ajax-related callbacks. By default, the context is an object that represents the ajax settings used in the call ($.ajaxSettings merged with the settings passed to $.ajax). For example, specifying a DOM element as the context will make that the context for the complete callback of a request, like so:
+ This object will be the context of all Ajax-related callbacks. By default, the context is an object that represents the Ajax settings used in the call ($.ajaxSettings merged with the settings passed to $.ajax). For example, specifying a DOM element as the context will make that the context for the complete callback of a request, like so:
$.ajax({
url: "test.html",
From 21a91138b77737ca3019a203d5158e62b265677d Mon Sep 17 00:00:00 2001
From: Aurelio De Rosa
Date: Sat, 11 Apr 2015 17:44:07 +0100
Subject: [PATCH 284/699] jQuery.ajax: surround `data` by ``
Closes gh-714
---
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 51bdb838..f2db327d 100644
--- a/entries/jQuery.ajax.xml
+++ b/entries/jQuery.ajax.xml
@@ -114,7 +114,7 @@ $.ajax({
A password to be used with XMLHttpRequest in response to an HTTP access authentication request.
- By default, data passed in to the data option as an object (technically, anything other than a string) will be processed and transformed into a query string, fitting to the default content-type "application/x-www-form-urlencoded". If you want to send a DOMDocument, or other non-processed data, set this option to false.
+ By default, data passed in to the data option as an object (technically, anything other than a string) will be processed and transformed into a query string, fitting to the default content-type "application/x-www-form-urlencoded". If you want to send a DOMDocument, or other non-processed data, set this option to false.Only applies when the "script" transport is used (e.g., cross-domain requests with "jsonp" or "script" dataType and "GET" type). Sets the charset attribute on the script tag used in the request. Used when the character set on the local page is not the same as the one on the remote script.
From 5b04f937be9e8df0dc93b32a3940721ad2b19469 Mon Sep 17 00:00:00 2001
From: Aurelio De Rosa
Date: Sun, 12 Apr 2015 19:55:40 +0100
Subject: [PATCH 285/699] jQuery.animate: remove misplaced parenthesis
Closes gh-715
---
entries/animate.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/entries/animate.xml b/entries/animate.xml
index d05f366e..2cbec644 100644
--- a/entries/animate.xml
+++ b/entries/animate.xml
@@ -22,7 +22,7 @@
The .animate() method allows us to create animation effects on any numeric CSS property. The only required parameter is a plain object of CSS properties. This object is similar to the one that can be sent to the .css() method, except that the range of properties is more restrictive.
Animation Properties and Values
-
All animated properties should be animated to a single numeric value, except as noted below; most properties that are non-numeric cannot be animated using basic jQuery functionality (For example, width, height, or left can be animated but background-color cannot be, unless the jQuery.Color() plugin is used). Property values are treated as a number of pixels unless otherwise specified. The units em and % can be specified where applicable.
+
All animated properties should be animated to a single numeric value, except as noted below; most properties that are non-numeric cannot be animated using basic jQuery functionality (For example, width, height, or left can be animated but background-color cannot be, unless the jQuery.Color plugin is used). Property values are treated as a number of pixels unless otherwise specified. The units em and % can be specified where applicable.
In addition to style properties, some non-style properties such as scrollTop and scrollLeft, as well as custom properties, can be animated.
Shorthand CSS properties (e.g. font, background, border) are not fully supported. For example, if you want to animate the rendered border width, at least a border style and border width other than "auto" must be set in advance. Or, if you want to animate font size, you would use fontSize or the CSS equivalent 'font-size' rather than simply 'font'.
In addition to numeric values, each property can take the strings 'show', 'hide', and 'toggle'. These shortcuts allow for custom hiding and showing animations that take into account the display type of the element. In order to use jQuery's built-in toggle state tracking, the 'toggle' keyword must be consistently given as the value of the property being animated.
From 473613debe97676a56853453bde5c382625af9f4 Mon Sep 17 00:00:00 2001
From: Arthur Verschaeve
Date: Thu, 16 Apr 2015 10:29:34 +0200
Subject: [PATCH 286/699] 1.11.88
---
package.json | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/package.json b/package.json
index 982763b4..d184215d 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.11.87",
+ "version": "1.11.88",
"homepage": "https://github.com/jquery/api.jquery.com",
"author": {
"name": "jQuery Foundation and other contributors"
From 929f9e2472ec0da31446860f3e6a34f35321a6a2 Mon Sep 17 00:00:00 2001
From: Arthur Verschaeve
Date: Thu, 9 Apr 2015 14:30:44 +0200
Subject: [PATCH 287/699] Types: add new type `array-like object`
Fixes gh-708
Closes gh-710
---
pages/Types.html | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/pages/Types.html b/pages/Types.html
index 422f6bd6..feab0a76 100644
--- a/pages/Types.html
+++ b/pages/Types.html
@@ -73,6 +73,7 @@
This indicates that the method doesn't only expect an array as the argument, but also specifies the expected type. The notation is borrowed from Java 5's generics notation (or C++ templates).
+
Array-Like Objects
+
Either a true JavaScript Array or a JavaScript Object that contains a nonnegative integer length property and index properties from 0 up to length - 1. This latter case includes array-like objects commonly encountered in web-based code such as the arguments object and the NodeList object returned by many DOM methods.
+
When a jQuery API accepts either plain Objects or Array-Like objects, a plain Object with a numeric length property will trigger the Array-Like behavior.
PlainObject
The PlainObject type is a JavaScript object containing zero or more key-value pairs. The plain object is, in other words, an Object object. It is designated "plain" in jQuery documentation to distinguish it from other kinds of JavaScript objects: for example, null, user-defined arrays, and host objects such as document, all of which have a typeof value of "object." The jQuery.isPlainObject() method identifies whether the passed argument is a plain object or not, as demonstrated below:
From e0f1e222950c9dcf9e64805318fccafe1025d8be Mon Sep 17 00:00:00 2001
From: Arthur Verschaeve
Date: Thu, 16 Apr 2015 22:54:55 +0200
Subject: [PATCH 288/699] 1.11.89
---
package.json | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/package.json b/package.json
index d184215d..713b6127 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.11.88",
+ "version": "1.11.89",
"homepage": "https://github.com/jquery/api.jquery.com",
"author": {
"name": "jQuery Foundation and other contributors"
From c0e5d54c16713fe39f93d4ca8276ada8723d8fe2 Mon Sep 17 00:00:00 2001
From: Arthur Verschaeve
Date: Tue, 31 Mar 2015 16:33:29 +0200
Subject: [PATCH 289/699] jQuery.merge: accept array-like objects instead of
arrays
Fixes gh-686
Closes gh-692
---
entries/jQuery.merge.xml | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/entries/jQuery.merge.xml b/entries/jQuery.merge.xml
index ef43c770..053fff03 100644
--- a/entries/jQuery.merge.xml
+++ b/entries/jQuery.merge.xml
@@ -4,15 +4,15 @@
Merge the contents of two arrays together into the first array. 1.0
-
- The first array to merge, the elements of second added.
+
+ The first array-like object to merge, the elements of second added.
-
- The second array to merge into the first, unaltered.
+
+ The second array-like object to merge into the first, unaltered.
-
The $.merge() operation forms an array that contains all elements from the two arrays. The orders of items in the arrays are preserved, with items from the second array appended. The $.merge() function is destructive. It alters the first parameter to add the items from the second.
+
The $.merge() operation forms an array that contains all elements from the two arrays. The orders of items in the arrays are preserved, with items from the second array appended. The $.merge() function is destructive. It alters the length and numeric index properties of the first object to include items from the second.
If you need the original first array, make a copy of it before calling $.merge(). Fortunately, $.merge() itself can be used for this duplication:
var newArray = $.merge([], oldArray);
From 11636011aa377d1af31527afa1c40919aff8d0a7 Mon Sep 17 00:00:00 2001
From: Arthur Verschaeve
Date: Thu, 16 Apr 2015 23:14:15 +0200
Subject: [PATCH 290/699] Types: rename `array-like objects` to `array-like
object`
---
entries/jQuery.merge.xml | 4 ++--
pages/Types.html | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/entries/jQuery.merge.xml b/entries/jQuery.merge.xml
index 053fff03..b122635e 100644
--- a/entries/jQuery.merge.xml
+++ b/entries/jQuery.merge.xml
@@ -4,10 +4,10 @@
Merge the contents of two arrays together into the first array. 1.0
-
+ The first array-like object to merge, the elements of second added.
-
+ The second array-like object to merge into the first, unaltered.
diff --git a/pages/Types.html b/pages/Types.html
index feab0a76..5cd81ca6 100644
--- a/pages/Types.html
+++ b/pages/Types.html
@@ -73,7 +73,7 @@
This indicates that the method doesn't only expect an array as the argument, but also specifies the expected type. The notation is borrowed from Java 5's generics notation (or C++ templates).
-
Array-Like Objects
+
Array-Like Object
Either a true JavaScript Array or a JavaScript Object that contains a nonnegative integer length property and index properties from 0 up to length - 1. This latter case includes array-like objects commonly encountered in web-based code such as the arguments object and the NodeList object returned by many DOM methods.
When a jQuery API accepts either plain Objects or Array-Like objects, a plain Object with a numeric length property will trigger the Array-Like behavior.
After this code executes, clicks on Trigger the handler will also alert the message.
The blur event does not bubble in Internet Explorer. Therefore, scripts that rely on event delegation with the blur event will not work consistently across browsers. As of version 1.4.2, however, jQuery works around this limitation by mapping blur to the focusout event in its event delegation methods, .live() and .delegate().
+ To trigger the blur event on all paragraphs:Note: Changing the value of an input element using JavaScript, using .val() for example, won't fire the event.
+ Attaches a change event to the select that gets the text for each selected option and writes them in the div. It then triggers the event for the initial text draw.
This is usually the desired sequence before taking an action. If this is not required, the mousedown or mouseup event may be more suitable.
+ Hide paragraphs on a page when they are clicked:It is inadvisable to bind handlers to both the click and dblclick events for the same element. The sequence of events triggered varies from browser to browser, with some receiving two click events before the dblclick and others only one. Double-click sensitivity (maximum time between clicks that is detected as a double click) can vary by operating system and browser, and is often user-configurable.
+ To bind a "Hello World!" alert box the dblclick event on every paragraph on the page:
Note: A jQuery error event handler should not be attached to the window object. The browser fires the window's error event when a script error occurs. However, the window error event receives different arguments and has different return value requirements than conventional event handlers. Use window.onerror instead.
+ To hide the "broken image" icons for IE users, you can try:After this code executes, clicks on Trigger the handler will also alert the message.
The focus event does not bubble in Internet Explorer. Therefore, scripts that rely on event delegation with the focus event will not work consistently across browsers. As of version 1.4.2, however, jQuery works around this limitation by mapping focus to the focusin event in its event delegation methods, .live() and .delegate().
+ Fire focus.The focusin event is sent to an element when it, or any element inside of it, gains focus. This is distinct from the focus event in that it supports detecting the focus event on parent elements (in other words, it supports event bubbling).
This event will likely be used together with the focusout event.
+ Watch for a focus to occur within the paragraphs on the page.The focusout event is sent to an element when it, or any element inside of it, loses focus. This is distinct from the blur event in that it supports detecting the loss of focus on descendant elements (in other words, it supports event bubbling).
This event will likely be used together with the focusin event.
+ Watch for a loss of focus to occur inside paragraphs and note the difference between the focusout count and the blur count. (The blur count does not change because those events do not bubble.)If key presses anywhere need to be caught (for example, to implement global shortcut keys on a page), it is useful to attach this behavior to the document object. Because of event bubbling, all key presses will make their way up the DOM to the document object unless explicitly stopped.
To determine which key was pressed, examine the event object that is passed to the handler function. While browsers use differing properties to store this information, jQuery normalizes the .which property so you can reliably use it to retrieve the key code. This code corresponds to a key on the keyboard, including codes for special keys such as arrows. For catching actual text entry, .keypress() may be a better choice.
+ Show the event object for the keydown handler when a key is pressed in the input.To determine which character was entered, examine the event object that is passed to the handler function. While browsers use differing properties to store this information, jQuery normalizes the .which property so you can reliably use it to retrieve the character code.
Note that keydown and keyup provide a code indicating which key is pressed, while keypress indicates which character was entered. For example, a lowercase "a" will be reported as 65 by keydown and keyup, but as 97 by keypress. An uppercase "A" is reported as 65 by all events. Because of this distinction, when catching special keystrokes such as arrow keys, .keydown() or .keyup() is a better choice.
+ 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.If key presses anywhere need to be caught (for example, to implement global shortcut keys on a page), it is useful to attach this behavior to the document object. Because of event bubbling, all key presses will make their way up the DOM to the document object unless explicitly stopped.
To determine which key was pressed, examine the event object that is passed to the handler function. While browsers use differing properties to store this information, jQuery normalizes the .which property so you can reliably use it to retrieve the key code. This code corresponds to a key on the keyboard, including codes for special keys such as arrows. For catching actual text entry, .keypress() may be a better choice.
+ Show the event object for the keyup handler (using a simple $.print plugin) when a key is released in the input.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.
+ Show texts when mouseup and mousedown event triggering.After this code executes, clicks on Trigger the handler will also append the message.
The mouseenter event differs from mouseover in the way it handles event bubbling. If mouseover were used in this example, then when the mouse pointer moved over the Inner element, the handler would be triggered. This is usually undesirable behavior. The mouseenter event, on the other hand, only triggers its handler when the mouse enters the element it is bound to, not a descendant. So in this example, the handler is triggered when the mouse enters the Outer element, but not the Inner element.
+ Show texts when mouseenter and mouseout event triggering.
mouseover fires when the pointer moves into the child element as well, while mouseenter fires only when the pointer moves into the bound element.
diff --git a/entries/mouseleave.xml b/entries/mouseleave.xml
index 25ed2dc7..56adcb65 100644
--- a/entries/mouseleave.xml
+++ b/entries/mouseleave.xml
@@ -55,6 +55,7 @@ $( "#other" ).click(function() {
After this code executes, clicks on Trigger the handler will also append the message.
The mouseleave event differs from mouseout in the way it handles event bubbling. If mouseout were used in this example, then when the mouse pointer moved out of the Inner element, the handler would be triggered. This is usually undesirable behavior. The mouseleave event, on the other hand, only triggers its handler when the mouse leaves the element it is bound to, not a descendant. So in this example, the handler is triggered when the mouse leaves the Outer element, but not the Inner element.
+ Show number of times mouseout and mouseleave events are triggered. mouseout fires when the pointer moves out of child element as well, while mouseleave fires only when the pointer moves out of the bound element.Keep in mind that the mousemove event is triggered whenever the mouse pointer moves, even for a pixel. This means that hundreds of events can be generated over a very small amount of time. If the handler has to do any significant processing, or if multiple handlers for the event exist, this can be a serious performance drain on the browser. It is important, therefore, to optimize mousemove handlers as much as possible, and to unbind them as soon as they are no longer needed.
A common pattern is to bind the mousemove handler from within a mousedown hander, and to unbind it from a corresponding mouseup handler. If implementing this sequence of events, remember that the mouseup event might be sent to a different HTML element than the mousemove event was. To account for this, the mouseup handler should typically be bound to an element high up in the DOM tree, such as <body>.
+ Show the mouse coordinates when the mouse is moved over the yellow div. Coordinates are relative to the window, which in this case is the iframe.After this code executes, clicks on Trigger the handler will also append the message.
This event type can cause many headaches due to event bubbling. For instance, when the mouse pointer moves out of the Inner element in this example, a mouseout event will be sent to that, then trickle up to Outer. This can trigger the bound mouseout handler at inopportune times. See the discussion for .mouseleave() for a useful alternative.
+ Show the number of times mouseout and mouseleave events are triggered.
mouseout fires when the pointer moves out of the child element as well, while mouseleave fires only when the pointer moves out of the bound element.
diff --git a/entries/mouseover.xml b/entries/mouseover.xml
index d8e8b0b0..f2ca8c02 100644
--- a/entries/mouseover.xml
+++ b/entries/mouseover.xml
@@ -56,6 +56,7 @@ $( "#other" ).click(function() {
After this code executes, clicks on Trigger the handler will also append the message.
This event type can cause many headaches due to event bubbling. For instance, when the mouse pointer moves over the Inner element in this example, a mouseover event will be sent to that, then trickle up to Outer. This can trigger our bound mouseover handler at inopportune times. See the discussion for .mouseenter() for a useful alternative.
+ Show the number of times mouseover and mouseenter events are triggered.
mouseover fires when the pointer moves into the child element as well, while mouseenter fires only when the pointer moves into the bound element.
diff --git a/entries/mouseup.xml b/entries/mouseup.xml
index 80d0f619..31640a96 100644
--- a/entries/mouseup.xml
+++ b/entries/mouseup.xml
@@ -56,6 +56,7 @@ $( "#other" ).click(function() {
After this code executes, clicks on Trigger the handler will also alert the message.
If the user clicks outside an element, drags onto it, and releases the button, this is still counted as a mouseup event. This sequence of actions is not treated as a button press in most user interfaces, so it is usually better to use the click event unless we know that the mouseup event is preferable for a particular situation.
+ Show texts when mouseup and mousedown event triggering.Now whenever the browser window's size is changed, the message is appended to <div id="log"> one or more times, depending on the browser.
Code in a resize handler should never rely on the number of times the handler is called. Depending on implementation, resize events can be sent continuously as the resizing is in progress (the typical behavior in Internet Explorer and WebKit-based browsers such as Safari and Chrome), or only once at the end of the resize operation (the typical behavior in some other browsers such as Opera).
+ To see the window width while (or after) it is resized, try:After this code executes, clicks on Trigger the handler will also append the message.
A scroll event is sent whenever the element's scroll position changes, regardless of the cause. A mouse click or drag on the scroll bar, dragging inside the element, pressing the arrow keys, or using the mouse's scroll wheel could cause this event.
+ To do something when your page is scrolled:The method for retrieving the current selected text differs from one browser to another. A number of jQuery plug-ins offer cross-platform solutions.
+ To do something when text in input boxes is selected:After this code executes, clicks on Trigger the handler will also display the message. In addition, the default submit action on the form will be fired, so the form will be submitted.
The JavaScript submit event does not bubble in Internet Explorer. However, scripts that rely on event delegation with the submit event will work consistently across browsers as of jQuery 1.4, which has normalized the event's behavior.
+ If you'd like to prevent forms from being submitted unless a flag variable is set, try:
diff --git a/entries/unload.xml b/entries/unload.xml
index e33dc639..493e631f 100644
--- a/entries/unload.xml
+++ b/entries/unload.xml
@@ -33,6 +33,7 @@ $( window ).unload(function() {
This event is available so that scripts can perform cleanup when the user leaves the page. Most browsers will ignore calls to alert(), confirm() and prompt() inside the event handler. The string you return may be used in a confirmation dialog, but not all browsers support this. It is not possible to cancel the unload event with .preventDefault().
+ To display an alert when a page is unloaded:
Using this selector heavily can have performance implications, as it may force the browser to re-render the page before it can determine visibility. Tracking the visibility of elements via other methods, using a class for example, can provide better performance.
+
+ As the .() method is just a shorthand for .on( "", handler ), detaching is possible using .off( "" ).
+
From 85581c0adfc2e5a38e8d17c7a8a1510781d5ee05 Mon Sep 17 00:00:00 2001
From: Arthur Verschaeve
Date: Fri, 17 Apr 2015 21:06:17 +0200
Subject: [PATCH 293/699] 1.11.91
---
package.json | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/package.json b/package.json
index d5ea4af1..edffe6e3 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.11.90",
+ "version": "1.11.91",
"homepage": "https://github.com/jquery/api.jquery.com",
"author": {
"name": "jQuery Foundation and other contributors"
From 4f0a6f3dd7ff96580b5f466bad9b59cc4ca1525e Mon Sep 17 00:00:00 2001
From: Aurelio De Rosa
Date: Sat, 28 Feb 2015 23:34:56 +0000
Subject: [PATCH 294/699] jQuery.data: correct info on `.data( "name",
undefined )`
Fixes gh-586
Closes gh-673
---
entries/jQuery.data.xml | 2 +-
notes.xsl | 5 ++++-
2 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/entries/jQuery.data.xml b/entries/jQuery.data.xml
index 193cae70..bc1bab43 100644
--- a/entries/jQuery.data.xml
+++ b/entries/jQuery.data.xml
@@ -25,7 +25,7 @@ jQuery.data( document.body, "bar", "test" );
-
+ Store then retrieve a value from the div element.
- undefined is not recognised as a data value. Calls such as ( , undefined ) will return the corresponding data for "name", and is therefore the same as ( ).
+ undefined is not recognized as a data value. Calls such as ( , undefined ) will return the jQuery object that it was called on, allowing for chaining.
+
+
+ undefined is not recognized as a data value. Calls such as ( , undefined ) will return the corresponding data for "name", and is therefore the same as ( ).
The number returned by dimensions-related APIs, including , may be fractional in some cases. Code should not assume it is an integer. Also, dimensions may be incorrect when the page is zoomed by the user; browsers do not expose an API to detect this condition.
From 9840ff0919dce92b3fe1e3b9de771daba54c3032 Mon Sep 17 00:00:00 2001
From: Arthur Verschaeve
Date: Fri, 17 Apr 2015 21:09:58 +0200
Subject: [PATCH 295/699] 1.11.92
---
package.json | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/package.json b/package.json
index edffe6e3..3df6c618 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.11.91",
+ "version": "1.11.92",
"homepage": "https://github.com/jquery/api.jquery.com",
"author": {
"name": "jQuery Foundation and other contributors"
From bb4da5ebf10b684002838a5fd4bbd18014a4edef Mon Sep 17 00:00:00 2001
From: Arthur Verschaeve
Date: Thu, 16 Apr 2015 11:15:18 +0200
Subject: [PATCH 296/699] Trigger: add note about objects with a `length`
property
Fixes gh-377
Closes gh-716
---
entries/trigger.xml | 1 +
1 file changed, 1 insertion(+)
diff --git a/entries/trigger.xml b/entries/trigger.xml
index c840b058..91e3c26a 100644
--- a/entries/trigger.xml
+++ b/entries/trigger.xml
@@ -46,6 +46,7 @@ $( "#foo").trigger( "custom", [ "Custom", "Event" ] );
The .trigger() method can be used on jQuery collections that wrap plain JavaScript objects similar to a pub/sub mechanism; any event handlers bound to the object will be called when the event is triggered.
Note: For both plain objects and DOM objects other than window, if a triggered event name matches the name of a property on the object, jQuery will attempt to invoke the property as a method if no event handler calls event.preventDefault(). If this behavior is not desired, use .triggerHandler() instead.
Note: As with .triggerHandler(), when calling .trigger() with an event name matches the name of a property on the object, prefixed by on (e.g. triggering click on window that has a non null onclick method), jQuery will attempt to invoke that property as a method.
+
Note: When triggering with a plain object that is not array-like but still contains a length property, you should pass the object in an array (e.g. [ { length: 1 } ]).
Clicks to button #2 also trigger a click for button #1.
From c0c72c680d146a750a42cf966368a7e3beaa35be Mon Sep 17 00:00:00 2001
From: Arthur Verschaeve
Date: Sun, 19 Apr 2015 15:04:11 +0200
Subject: [PATCH 297/699] 1.11.93
---
package.json | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/package.json b/package.json
index 3df6c618..5d9f7f24 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.11.92",
+ "version": "1.11.93",
"homepage": "https://github.com/jquery/api.jquery.com",
"author": {
"name": "jQuery Foundation and other contributors"
From 225389fb6aeb14bbe9c2ee290d7617a45801cfef Mon Sep 17 00:00:00 2001
From: Karl Swedberg
Date: Sat, 28 Mar 2015 08:44:51 -0400
Subject: [PATCH 298/699] jQuery.parseHTML: Fix a couple typos
---
entries/jQuery.parseHTML.xml | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/entries/jQuery.parseHTML.xml b/entries/jQuery.parseHTML.xml
index 06f59937..930d60a2 100644
--- a/entries/jQuery.parseHTML.xml
+++ b/entries/jQuery.parseHTML.xml
@@ -18,10 +18,10 @@
jQuery.parseHTML uses native methods to convert the string to a set of DOM nodes, which can then be inserted into the document. These methods do render all trailing or leading text (even if that's just whitespace). To prevent trailing/leading whitespace from being converted to text nodes you can pass the HTML string through jQuery.trim.
By default, the context is the current document if not specified or given as null or undefined. If the HTML was to be used in another document such as an iframe, that frame's document could be used.
Security Considerations
-
Most jQuery APIs that accept HTML strings will run scripts that are included in the HTML. jQuery.parseHTML does not run script in the parsed HTML unless keepScripts is explicitly true. However, it is still possible in most environments to execute script indirectly, for example via the <img onerror> attribute. The caller should be aware of this and guard against it by cleaning or escaping any untrusted inputs from sources such as the URL or cookies. For future compatibility, callers should not depend on the ability to run any script content when keepScripts is unspecified or false.
+
Most jQuery APIs that accept HTML strings will run scripts that are included in the HTML. jQuery.parseHTML does not run scripts in the parsed HTML unless keepScripts is explicitly true. However, it is still possible in most environments to execute scripts indirectly, for example via the <img onerror> attribute. The caller should be aware of this and guard against it by cleaning or escaping any untrusted inputs from sources such as the URL or cookies. For future compatibility, callers should not depend on the ability to run any script content when keepScripts is unspecified or false.
- Create an array of Dom nodes using an HTML string and insert it into a div.
+ Create an array of DOM nodes using an HTML string and insert it into a div.
Content:
From 2365251f90e9fd5f183dad30d169fe92517ef12e Mon Sep 17 00:00:00 2001
From: Karl Swedberg
Date: Tue, 21 Apr 2015 09:16:13 -0400
Subject: [PATCH 299/699] Release 1.11.94
---
package.json | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/package.json b/package.json
index 5d9f7f24..6cc2c945 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.11.93",
+ "version": "1.11.94",
"homepage": "https://github.com/jquery/api.jquery.com",
"author": {
"name": "jQuery Foundation and other contributors"
From c6565eb34e45a07b9c1fb8acd88e6fdd5ec05d37 Mon Sep 17 00:00:00 2001
From: Arthur Verschaeve
Date: Wed, 22 Apr 2015 20:23:23 +0200
Subject: [PATCH 300/699] next-adjacent: rename file to
`next-adjacent-selector.xml`
Ref gh-722
Closes gh-723
---
.../{next-adjacent-Selector.xml => next-adjacent-selector.xml} | 0
1 file changed, 0 insertions(+), 0 deletions(-)
rename entries/{next-adjacent-Selector.xml => next-adjacent-selector.xml} (100%)
diff --git a/entries/next-adjacent-Selector.xml b/entries/next-adjacent-selector.xml
similarity index 100%
rename from entries/next-adjacent-Selector.xml
rename to entries/next-adjacent-selector.xml
From 484615071377dfcb1c3a57e27e0a76704ac78a94 Mon Sep 17 00:00:00 2001
From: Arthur Verschaeve
Date: Wed, 29 Apr 2015 20:08:58 +0200
Subject: [PATCH 301/699] 1.11.95
---
package.json | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/package.json b/package.json
index 6cc2c945..b86e0850 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.11.94",
+ "version": "1.11.95",
"homepage": "https://github.com/jquery/api.jquery.com",
"author": {
"name": "jQuery Foundation and other contributors"
From 1344eb35fb792ea0d7a148be96bbb81e84f08fea Mon Sep 17 00:00:00 2001
From: Dave Methvin
Date: Mon, 20 Apr 2015 15:37:41 -0400
Subject: [PATCH 302/699] Dimensions: Update hidden element note
Add information about it being bad practice, inaccurate, and subject to removal
in a future version of jQuery. It probably causes cancer too.
Fixes gh-197
Closes gh-721
---
entries/height.xml | 2 +-
entries/innerHeight.xml | 2 +-
entries/innerWidth.xml | 2 +-
entries/outerHeight.xml | 2 +-
entries/outerWidth.xml | 2 +-
entries/width.xml | 2 +-
notes.xsl | 4 ++--
7 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/entries/height.xml b/entries/height.xml
index 9d4b86bc..7efdf312 100644
--- a/entries/height.xml
+++ b/entries/height.xml
@@ -26,7 +26,7 @@ $( document ).height();
-
+ Show various heights. Note the values are from the iframe so might be smaller than you expected. The yellow highlight shows the iframe body.
-
+ Get the innerHeight of a paragraph.
-
+ Get the innerWidth of a paragraph.
-
+ Get the outerHeight of a paragraph.
-
+ Get the outerWidth of a paragraph.
-
+ Show various widths. Note the values are from the iframe so might be smaller than you expected. The yellow highlight shows the iframe body.
Forms and their child elements should not use input names or ids that conflict with properties of a form, such as submit, length, or method. Name conflicts can cause confusing failures. For a complete list of rules and to check your markup for these problems, see DOMLint.
-
- The value reported by is not guaranteed to be accurate when the element's parent is hidden. To get an accurate value, you should show the parent first, before using .
+
+ The value reported by is not guaranteed to be accurate when the element or its parent is hidden. To get an accurate value, ensure the element is visible before using . jQuery will attempt to temporarily show and then re-hide an element in order to measure its dimensions, but this is unreliable and (even when accurate) can significantly impact page performance. This show-and-rehide measurement feature may be removed in a future version of jQuery.
Because is a jQuery extension and not part of the CSS specification, queries using cannot take advantage of the performance boost provided by the native DOM querySelectorAll() method. To achieve the best performance when using to select elements, first select the elements using a pure CSS selector, then use .filter("").
From 1af8d45cc1ab347e0adaa316375f0d571128a4bb Mon Sep 17 00:00:00 2001
From: Arthur Verschaeve
Date: Wed, 29 Apr 2015 20:21:19 +0200
Subject: [PATCH 303/699] 1.11.96
---
package.json | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/package.json b/package.json
index b86e0850..bc0c4a63 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.11.95",
+ "version": "1.11.96",
"homepage": "https://github.com/jquery/api.jquery.com",
"author": {
"name": "jQuery Foundation and other contributors"
From 32ffc61e968401c2e791ffc688010431a62c243e Mon Sep 17 00:00:00 2001
From: Arthur Verschaeve
Date: Wed, 29 Apr 2015 20:11:27 +0200
Subject: [PATCH 304/699] jQuery.post: change order of signatures
Closes gh-726
Fixes gh-725
---
entries/jQuery.post.xml | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/entries/jQuery.post.xml b/entries/jQuery.post.xml
index 2300cbe7..8a1bdc43 100644
--- a/entries/jQuery.post.xml
+++ b/entries/jQuery.post.xml
@@ -1,12 +1,6 @@
jQuery.post()
-
- 3.0
-
- A set of key/value pairs that configure the Ajax request. All properties except for url are optional. A default can be set for any option with $.ajaxSetup(). See jQuery.ajax( settings ) for a complete list of all settings. Type will automatically be set to POST.
-
- 1.0
@@ -27,6 +21,12 @@
The type of data expected from the server. Default: Intelligent Guess (xml, json, script, text, html).
+
+ 3.0
+
+ A set of key/value pairs that configure the Ajax request. All properties except for url are optional. A default can be set for any option with $.ajaxSetup(). See jQuery.ajax( settings ) for a complete list of all settings. Type will automatically be set to POST.
+
+ Load data from the server using a HTTP POST request.
This is a shorthand Ajax function, which is equivalent to:
From 74d690ffc8af49cace4785e52eec70668a43068c Mon Sep 17 00:00:00 2001
From: Arthur Verschaeve
Date: Wed, 22 Apr 2015 20:34:58 +0200
Subject: [PATCH 305/699] offsetParent: Add correct ``
Fixes gh-722
Closes gh-724
---
entries/offsetParent.xml | 1 +
1 file changed, 1 insertion(+)
diff --git a/entries/offsetParent.xml b/entries/offsetParent.xml
index 363c3208..c49a7044 100644
--- a/entries/offsetParent.xml
+++ b/entries/offsetParent.xml
@@ -59,4 +59,5 @@ $( "li.item-a" ).offsetParent().css( "background-color", "red" );
+
From 31d2ab4182a33ecd6a54c6b5ed3cad42fb0ebca5 Mon Sep 17 00:00:00 2001
From: Arthur Verschaeve
Date: Fri, 1 May 2015 09:18:42 +0200
Subject: [PATCH 306/699] 1.11.97
---
package.json | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/package.json b/package.json
index bc0c4a63..8ba1dd52 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.11.96",
+ "version": "1.11.97",
"homepage": "https://github.com/jquery/api.jquery.com",
"author": {
"name": "jQuery Foundation and other contributors"
From 699e63f1b8c74b428bf2e2b0115db7441e3a2f85 Mon Sep 17 00:00:00 2001
From: Chris Rebert
Date: Thu, 7 May 2015 12:50:10 -0700
Subject: [PATCH 307/699] event.metaKey: Explain which key is `META` on common
platforms
Sources:
* https://w3c.github.io/uievents/#widl-KeyboardEvent-metaKey
* https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent/metaKey
Closes gh-735
---
entries/event.metaKey.xml | 2 ++
1 file changed, 2 insertions(+)
diff --git a/entries/event.metaKey.xml b/entries/event.metaKey.xml
index bca1b7b2..b83eeadd 100644
--- a/entries/event.metaKey.xml
+++ b/entries/event.metaKey.xml
@@ -8,6 +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.
Determine whether the META key was pressed when the event fired.
From 7ecff5dd61e6137858e063d5d352ee50ba8f127d Mon Sep 17 00:00:00 2001
From: Arthur Verschaeve
Date: Mon, 11 May 2015 06:56:16 +0200
Subject: [PATCH 308/699] 1.11.98
---
package.json | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/package.json b/package.json
index 8ba1dd52..d75c90bd 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.11.97",
+ "version": "1.11.98",
"homepage": "https://github.com/jquery/api.jquery.com",
"author": {
"name": "jQuery Foundation and other contributors"
From ae3a65efea000b267ef67d63343dc29453ad68e4 Mon Sep 17 00:00:00 2001
From: Aurelio De Rosa
Date: Sat, 23 May 2015 19:54:22 +0100
Subject: [PATCH 309/699] jQuery(): Wrap code using the `code` element
Closes gh-743
---
entries/jQuery.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/entries/jQuery.xml b/entries/jQuery.xml
index fc13219d..287d0f0a 100644
--- a/entries/jQuery.xml
+++ b/entries/jQuery.xml
@@ -174,7 +174,7 @@ $( myForm.elements ).hide();
For explicit parsing of a string to HTML, use the $.parseHTML() method.
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.
+
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.
To ensure cross-platform compatibility, the snippet must be well-formed. Tags that can contain other elements should be paired with a closing tag:
From 66e94294b81748b66230005cc71c02de9755c78f Mon Sep 17 00:00:00 2001
From: Arthur Verschaeve
Date: Sat, 23 May 2015 22:19:57 +0200
Subject: [PATCH 310/699] 1.11.99
---
package.json | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/package.json b/package.json
index d75c90bd..97ddf8c0 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.11.98",
+ "version": "1.11.99",
"homepage": "https://github.com/jquery/api.jquery.com",
"author": {
"name": "jQuery Foundation and other contributors"
From be83880bcfed80ffe87771e5835a690d6216bbe8 Mon Sep 17 00:00:00 2001
From: Yuval Greenfield
Date: Sun, 19 Apr 2015 09:18:41 -0700
Subject: [PATCH 311/699] jQuery.ajax: Clarify information regarding
cross-domain `jsonp` usage
Closes gh-329
---
entries/jQuery.ajax.xml | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)
diff --git a/entries/jQuery.ajax.xml b/entries/jQuery.ajax.xml
index f2db327d..4c8f6686 100644
--- a/entries/jQuery.ajax.xml
+++ b/entries/jQuery.ajax.xml
@@ -74,8 +74,15 @@ $.ajax({
The type of data that you're expecting back from the server. If none is specified, jQuery will try to infer it based on the MIME type of the response (an XML MIME type will yield XML, in 1.4 JSON will yield a JavaScript object, in 1.4 script will execute the script, and anything else will be returned as a string). The available types (and the result passed as the first argument to your success callback) are:
-
"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. 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.
-
+
+
"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.)
+
"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 4bd46e4374437abb815dcac54438f61c66f93e92 Mon Sep 17 00:00:00 2001
From: Arthur Verschaeve
Date: Sun, 24 May 2015 19:45:23 +0200
Subject: [PATCH 312/699] 1.11.100
---
package.json | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/package.json b/package.json
index 97ddf8c0..0cda4e6d 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.11.99",
+ "version": "1.11.100",
"homepage": "https://github.com/jquery/api.jquery.com",
"author": {
"name": "jQuery Foundation and other contributors"
From 87d3f60d6634bf5d63ee7fd599a25a50000d32a2 Mon Sep 17 00:00:00 2001
From: Arthur Verschaeve
Date: Wed, 27 May 2015 21:54:26 +0200
Subject: [PATCH 313/699] Selector: correct `removed` version
Fixes gh-746
Closes gh-747
---
entries/selector.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/entries/selector.xml b/entries/selector.xml
index 971a2535..76a0ea5e 100644
--- a/entries/selector.xml
+++ b/entries/selector.xml
@@ -1,5 +1,5 @@
-
+.selector1.3
From fd5e89de6a79d9314cd4d27d517c374e659e6eab Mon Sep 17 00:00:00 2001
From: Arthur Verschaeve
Date: Thu, 28 May 2015 06:49:53 +0200
Subject: [PATCH 314/699] 1.11.101
---
package.json | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/package.json b/package.json
index 0cda4e6d..f428e95f 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.11.100",
+ "version": "1.11.101",
"homepage": "https://github.com/jquery/api.jquery.com",
"author": {
"name": "jQuery Foundation and other contributors"
From 2fbd82b48db4c5387f4f6d68084486fff8d4bf83 Mon Sep 17 00:00:00 2001
From: Arthur Verschaeve
Date: Sat, 9 May 2015 22:19:50 +0200
Subject: [PATCH 315/699] jQuery(): add note about support of text nodes
Fixes gh-709
Close gh-738
---
entries/contents.xml | 2 +-
entries/jQuery.xml | 3 ++-
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/entries/contents.xml b/entries/contents.xml
index 9f4d8b2f..6f348b9b 100644
--- a/entries/contents.xml
+++ b/entries/contents.xml
@@ -6,7 +6,7 @@
Get the children of each element in the set of matched elements, including text and comment nodes.
-
Given a jQuery object that represents a set of DOM elements, the .contents() method allows us to search through the immediate children of these elements in the DOM tree and construct a new jQuery object from the matching elements. The .contents() and .children() methods are similar, except that the former includes text nodes as well as HTML elements in the resulting jQuery object.
+
Given a jQuery object that represents a set of DOM elements, the .contents() method allows us to search through the immediate children of these elements in the DOM tree and construct a new jQuery object from the matching elements. The .contents() and .children() methods are similar, except that the former includes text nodes and comment nodes as well as HTML elements in the resulting jQuery object. Please note that most jQuery operations don't support text nodes and comment nodes. The few that do will have an explicit note on their API documentation page.
The .contents() method can also be used to get the content document of an iframe, if the iframe is on the same domain as the main page.
Consider a simple <div> with a number of text nodes, each of which is separated by two line break elements (<br>):
Internally, selector context is implemented with the .find() method, so $( "span", this ) is equivalent to $( this ).find( "span" ).
Using DOM elements
-
The second and third formulations of this function create a jQuery object using one or more DOM elements that were already selected in some other way. When passing an array, each element must be a DOM element; mixed data is not supported. A jQuery object is created from the array elements in the order they appeared in the array; unlike most other multi-element jQuery operations, the elements are not sorted in DOM order.
+
The second and third formulations of this function create a jQuery object using one or more DOM elements that were already selected in some other way. A jQuery object is created from the array elements in the order they appeared in the array; unlike most other multi-element jQuery operations, the elements are not sorted in DOM order. Elements will be copied from the array as-is and won't be unwrapped if they're already jQuery collections.
+
Please note that although you can pass text nodes and comment nodes into a jQuery collection this way, most operations don't support them. The few that do will have an explicit note on their API documentation page.
A common use of single-DOM-element construction is to call jQuery methods on an element that has been passed to a callback function through the keyword this:
$( "div.foo" ).click(function() {
From 2519ef6e70285e92d2a89db062e47a7e40182efc Mon Sep 17 00:00:00 2001
From: Arthur Verschaeve
Date: Sat, 30 May 2015 15:41:58 +0200
Subject: [PATCH 316/699] 1.11.102
---
package.json | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/package.json b/package.json
index f428e95f..c850d7e1 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.11.101",
+ "version": "1.11.102",
"homepage": "https://github.com/jquery/api.jquery.com",
"author": {
"name": "jQuery Foundation and other contributors"
From cc4cc30698bc19ebe075c8838b2da31b65d5b89d Mon Sep 17 00:00:00 2001
From: Chad Killingsworth
Date: Mon, 8 Jun 2015 09:14:43 -0500
Subject: [PATCH 317/699] deferred.promise: promise objects also have the
.promise() method
Closes gh-753
---
entries/deferred.promise.xml | 2 +-
pages/Types.html | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/entries/deferred.promise.xml b/entries/deferred.promise.xml
index d2a4c12d..db6550bd 100644
--- a/entries/deferred.promise.xml
+++ b/entries/deferred.promise.xml
@@ -9,7 +9,7 @@
Return a Deferred's Promise object.
-
The deferred.promise() method allows an asynchronous function to prevent other code from interfering with the progress or status of its internal request. The Promise exposes only the Deferred methods needed to attach additional handlers or determine the state (then, done, fail, always, pipe, progress, and state), but not ones that change the state (resolve, reject, notify, resolveWith, rejectWith, and notifyWith).
+
The deferred.promise() method allows an asynchronous function to prevent other code from interfering with the progress or status of its internal request. The Promise exposes only the Deferred methods needed to attach additional handlers or determine the state (then, done, fail, always, pipe, progress, state and promise), but not ones that change the state (resolve, reject, notify, resolveWith, rejectWith, and notifyWith).
If target is provided, deferred.promise() will attach the methods onto it and then return this object rather than create a new one. This can be useful to attach the Promise behavior to an object that already exists.
If you are creating a Deferred, keep a reference to the Deferred so that it can be resolved or rejected at some point. Return only the Promise object via deferred.promise() so other code can register callbacks or inspect the current state.
For more information, see the documentation for 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.
Promise Object
-
This object provides a subset of the methods of the Deferred object (then, done, fail, always, pipe, progress, and state) to prevent users from changing the state of the Deferred.
+
A multi-purpose object that provides a powerful way to manage callback lists. It supports adding, removing, firing, and disabling callbacks. The Callbacks object is created and returned by the $.Callbacks function and subsequently returned by most of that function's methods.
From 3a277ccdd8f767fffe85a698867abe3223134780 Mon Sep 17 00:00:00 2001
From: Arthur Verschaeve
Date: Tue, 9 Jun 2015 06:52:34 +0200
Subject: [PATCH 318/699] 1.11.103
---
package.json | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/package.json b/package.json
index c850d7e1..b788fab7 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.11.102",
+ "version": "1.11.103",
"homepage": "https://github.com/jquery/api.jquery.com",
"author": {
"name": "jQuery Foundation and other contributors"
From f389f0e279fc05bbcb3d7c9979a4a6cb16bb73fd Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Scott=20Gonz=C3=A1lez?=
Date: Tue, 9 Jun 2015 22:36:49 -0400
Subject: [PATCH 319/699] Build: Run `grunt lint` on Travis
Fixes jquery/api.jquery.com#749
---
.travis.yml | 5 +++++
Gruntfile.js | 7 ++++++-
package.json | 3 +++
3 files changed, 14 insertions(+), 1 deletion(-)
create mode 100644 .travis.yml
diff --git a/.travis.yml b/.travis.yml
new file mode 100644
index 00000000..86929762
--- /dev/null
+++ b/.travis.yml
@@ -0,0 +1,5 @@
+language: node_js
+node_js:
+ - "0.12"
+before_script:
+ - npm install -g grunt-cli
diff --git a/Gruntfile.js b/Gruntfile.js
index cc71e7be..05990732 100644
--- a/Gruntfile.js
+++ b/Gruntfile.js
@@ -22,7 +22,12 @@ grunt.initConfig({
all: "resources/**"
},
wordpress: (function() {
- var config = require( "./config" );
+
+ // There's no config for CI, but we don't need one for basic testing
+ var config = {};
+ try {
+ config = require( "./config" );
+ } catch ( error ) {}
config.dir = "dist/wordpress";
return config;
})()
diff --git a/package.json b/package.json
index b788fab7..c1eda129 100644
--- a/package.json
+++ b/package.json
@@ -20,6 +20,9 @@
"url": "https://github.com/jquery/api.jquery.com/blob/master/LICENSE.txt"
}
],
+ "scripts": {
+ "test": "grunt lint"
+ },
"dependencies": {
"grunt": "0.4.5",
"grunt-jquery-content": "2.0.0"
From bb24ed6b6f4e3d1983296cdd1960ce87cfad7cf2 Mon Sep 17 00:00:00 2001
From: Aurelio De Rosa
Date: Sun, 21 Jun 2015 18:47:17 +0100
Subject: [PATCH 320/699] focusout: Added missing signature
Closes gh-761
---
entries/focusout.xml | 3 +++
1 file changed, 3 insertions(+)
diff --git a/entries/focusout.xml b/entries/focusout.xml
index 1029a9e5..6b633c89 100644
--- a/entries/focusout.xml
+++ b/entries/focusout.xml
@@ -19,6 +19,9 @@
+
+ 1.0
+
This method is a shortcut for .on( "focusout", handler ) when passed arguments, and .trigger( "focusout" ) when no arguments are passed.
The focusout event is sent to an element when it, or any element inside of it, loses focus. This is distinct from the blur event in that it supports detecting the loss of focus on descendant elements (in other words, it supports event bubbling).
This method is a shortcut for .on('focusin', handler).
+
This method is a shortcut for .on( "focusin", handler ) in the first two variations, and .trigger( "focusin" ) in the third.
The focusin event is sent to an element when it, or any element inside of it, gains focus. This is distinct from the focus event in that it supports detecting the focus event on parent elements (in other words, it supports event bubbling).
This event will likely be used together with the focusout event.
From 6b02de00cb399d3bad6f0035224227e09eaf38e9 Mon Sep 17 00:00:00 2001
From: Aurelio De Rosa
Date: Mon, 29 Jun 2015 18:36:33 +0100
Subject: [PATCH 322/699] 1.11.104
---
package.json | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/package.json b/package.json
index c1eda129..82e98ffd 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.11.103",
+ "version": "1.11.104",
"homepage": "https://github.com/jquery/api.jquery.com",
"author": {
"name": "jQuery Foundation and other contributors"
From b337509696d5af5185cb69f1882cbd070133fa0e Mon Sep 17 00:00:00 2001
From: Eric Lee Carraway
Date: Fri, 3 Jul 2015 11:41:47 -0500
Subject: [PATCH 323/699] README: fix two typos
possesive => possessive
Authoritive => Authoritative
Closes gh-768
---
README.md | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/README.md b/README.md
index f720120c..0ded6592 100644
--- a/README.md
+++ b/README.md
@@ -32,7 +32,7 @@ The `xmllint` and `xsltproc` utilities need to be in your path. If you are on Wi
#### Pronoun Usage
* Use second-person pronoun ("you") when necessary, but try to avoid it.
-* Favor the definite article ("the") over second-person possesive ("your").
+* Favor the definite article ("the") over second-person possessive ("your").
* **Yes**: Insert the paragraph after the unordered list.
* **No**: Insert your paragraph after the unordered list.
* When editing current entries, change first-person plural pronouns ("we," "our," "us") to second-person.
@@ -83,5 +83,5 @@ Code in the API documentation should follow the [jQuery Core Style Guide](http:/
* Strong in English writing
* Tone
* Middle ground between formal and familiar. Err on the side of formality.
- * Authoritive
+ * Authoritative
* Tactful
From 14b0978b44062c443e879f31fe1dfa146453e631 Mon Sep 17 00:00:00 2001
From: Arthur Verschaeve
Date: Fri, 3 Jul 2015 18:52:18 +0200
Subject: [PATCH 324/699] 1.11.105
---
package.json | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/package.json b/package.json
index 82e98ffd..0876a658 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.11.104",
+ "version": "1.11.105",
"homepage": "https://github.com/jquery/api.jquery.com",
"author": {
"name": "jQuery Foundation and other contributors"
From cd61b061ce6509930e4842eca21b1b4c409ec627 Mon Sep 17 00:00:00 2001
From: Arthur Verschaeve
Date: Tue, 7 Jul 2015 12:22:44 +0200
Subject: [PATCH 325/699] Event.which: fix a typo
Fixes jquery/jquery.com#105
Closes gh-769
---
entries/event.which.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/entries/event.which.xml b/entries/event.which.xml
index efa9cddf..1d36d527 100644
--- a/entries/event.which.xml
+++ b/entries/event.which.xml
@@ -6,7 +6,7 @@
For key or mouse events, this property indicates the specific key or button that was pressed.
-
The event.which property normalizes event.keyCode and event.charCode. It is recommended to watch event.which for keyboard key input. For more detail, read about event.charCode on the MDC.
+
The event.which property normalizes event.keyCode and event.charCode. It is recommended to watch event.which for keyboard key input. For more detail, read about event.charCode on the MDN.
event.which also normalizes button presses (mousedown and mouseupevents), reporting 1 for left button, 2 for middle, and 3 for right. Use event.which instead of event.button.
From a4e5e98b129923067bb1c0d8d659423acca89398 Mon Sep 17 00:00:00 2001
From: Arthur Verschaeve
Date: Wed, 8 Jul 2015 13:37:44 +0200
Subject: [PATCH 326/699] 1.11.106
---
package.json | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/package.json b/package.json
index 0876a658..b9290c76 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.11.105",
+ "version": "1.11.106",
"homepage": "https://github.com/jquery/api.jquery.com",
"author": {
"name": "jQuery Foundation and other contributors"
From 37fe85787de8def42f220419f9cc27c8fc7d49f4 Mon Sep 17 00:00:00 2001
From: Aurelio De Rosa
Date: Sun, 24 May 2015 00:08:32 +0100
Subject: [PATCH 327/699] val: Updated description for the setter version
Fixes #712
Closes gh-744
---
entries/val.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/entries/val.xml b/entries/val.xml
index 184abdad..52f2023f 100644
--- a/entries/val.xml
+++ b/entries/val.xml
@@ -123,7 +123,7 @@ $( "input" )
Set the value of each element in the set of matched elements.
This method is typically used to set the values of form fields.
-
Passing an array of element values allows matching <input type="checkbox">, <input type="radio"> and <option>s inside of n <select multiple="multiple"> to be selected. In the case of <input type="radio">s that are part of a radio group and <select multiple="multiple"> the other elements will be deselected.
+
val() allows you to pass an array of element values. This is useful when working on a jQuery object containing elements like <input type="checkbox">, <input type="radio">, and <option>s inside of a <select>. In this case, the inputs and the options having a value that matches one of the elements of the array will be checked or selected while those having a value that don't match one of the elements of the array will be unchecked or unselected, depending on the type. In case of <input type="radio">s that are part of a radio group and <select>s, any previously selected element will be deselected.
The .val() method allows us to set the value by passing in a function. As of jQuery 1.4, the function is passed two arguments, the current element's index and its current value:
$( "input:text.items" ).val(function( index, value ) {
From bd14b435882735362b117690683cda631a634f65 Mon Sep 17 00:00:00 2001
From: Aurelio De Rosa
Date: Sat, 28 Feb 2015 15:28:10 +0000
Subject: [PATCH 328/699] README: Added note for the build process
Added a note to troubleshoot a possible issue when running the build
process on Windows.
Closes gh-669
---
README.md | 2 ++
1 file changed, 2 insertions(+)
diff --git a/README.md b/README.md
index 0ded6592..805e0442 100644
--- a/README.md
+++ b/README.md
@@ -11,6 +11,8 @@ To build and deploy your changes for previewing in a [`jquery-wp-content`](https
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.
+
## Style Guidelines
### Prose Style & Grammar
From 039224281affcc9d64d2475b98ac413cf5aa0217 Mon Sep 17 00:00:00 2001
From: Aurelio De Rosa
Date: Mon, 20 Jul 2015 00:53:24 +0100
Subject: [PATCH 329/699] 1.11.107
---
package.json | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/package.json b/package.json
index b9290c76..e572fd50 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.11.106",
+ "version": "1.11.107",
"homepage": "https://github.com/jquery/api.jquery.com",
"author": {
"name": "jQuery Foundation and other contributors"
From 96dd835e4d2d0d67b27116223d015afbc8ebea32 Mon Sep 17 00:00:00 2001
From: Annika Backstrom
Date: Fri, 24 Jul 2015 11:50:57 -0400
Subject: [PATCH 330/699] jQuery.Callbacks: fix a typo
Closes gh-783
---
entries/jQuery.Callbacks.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/entries/jQuery.Callbacks.xml b/entries/jQuery.Callbacks.xml
index 8443476b..c31de063 100644
--- a/entries/jQuery.Callbacks.xml
+++ b/entries/jQuery.Callbacks.xml
@@ -38,7 +38,7 @@ callbacks.fire( "bar!" );
The result of this is that it becomes simple to construct complex lists of callbacks where input values can be passed through to as many functions as needed with ease.
Two specific methods were being used above: .add() and .fire(). The .add() method supports adding new callbacks to the callback list, while the .fire() method executes the added functions and provides a way to pass arguments to be processed by the callbacks in the same list.
-
Another method supported by $.Callbacks is .remove(), which has the ability to remove a particular callback from the callback list. Here"s a practical example of .remove() being used:
+
Another method supported by $.Callbacks is .remove(), which has the ability to remove a particular callback from the callback list. Here's a practical example of .remove() being used:
var callbacks = $.Callbacks();
callbacks.add( fn1 );
From 5e0f6fa2d650ee8f88cf666064fa7dd519adcb04 Mon Sep 17 00:00:00 2001
From: Arthur Verschaeve
Date: Fri, 24 Jul 2015 17:56:58 +0200
Subject: [PATCH 331/699] 1.11.108
---
package.json | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/package.json b/package.json
index e572fd50..656ec6e2 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.11.107",
+ "version": "1.11.108",
"homepage": "https://github.com/jquery/api.jquery.com",
"author": {
"name": "jQuery Foundation and other contributors"
From 00c2ddc345c81d44b244f50e94381e3fcad22b9c Mon Sep 17 00:00:00 2001
From: Aurelio De Rosa
Date: Mon, 20 Jul 2015 01:06:12 +0100
Subject: [PATCH 332/699] deferred.always: Added note for parameters changing
order
Fixes gh-763
Closes gh-779
---
entries/deferred.always.xml | 1 +
1 file changed, 1 insertion(+)
diff --git a/entries/deferred.always.xml b/entries/deferred.always.xml
index 57b3cf7f..30e92193 100644
--- a/entries/deferred.always.xml
+++ b/entries/deferred.always.xml
@@ -17,6 +17,7 @@
Add handlers to be called when the Deferred object is either resolved or rejected.
The argument can be either a single function or an array of functions. When the Deferred is resolved or rejected, the alwaysCallbacks are called. Since deferred.always() returns the Deferred object, other methods of the Deferred object can be chained to this one, including additional .always() methods. When the Deferred is resolved or rejected, callbacks are executed in the order they were added, using the arguments provided to the resolve, reject, resolveWith or rejectWith method calls. For more information, see the documentation for Deferred object.
+
Note: The deferred.always() method receives the arguments that were used to .resolve() or .reject() the Deferred object, which are often very different. For this reason, it's best to use it only for actions that do not require inspecting the arguments. In all other cases, use explicit .done() or .fail() handlers since the arguments will have well-known orders.
Since the jQuery.get() method returns a jqXHR object, which is derived from a Deferred object, we can attach a callback for both success and error using the deferred.always() method.
From 30eb320cc1007335e05e446738769449cfcca605 Mon Sep 17 00:00:00 2001
From: Aurelio De Rosa
Date: Mon, 27 Jul 2015 22:07:12 +0100
Subject: [PATCH 333/699] 1.11.109
---
package.json | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/package.json b/package.json
index 656ec6e2..b1480c49 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.11.108",
+ "version": "1.11.109",
"homepage": "https://github.com/jquery/api.jquery.com",
"author": {
"name": "jQuery Foundation and other contributors"
From 7021a1202ef6cb5bc02838bb2bbbcd87e1e599d4 Mon Sep 17 00:00:00 2001
From: Arthur Verschaeve
Date: Thu, 23 Jul 2015 23:06:37 +0200
Subject: [PATCH 334/699] Build: move redirects from the infrastucture repo
Closes gh-782
---
package.json | 2 +-
redirects.json | 3 +++
2 files changed, 4 insertions(+), 1 deletion(-)
create mode 100644 redirects.json
diff --git a/package.json b/package.json
index b1480c49..83004b42 100644
--- a/package.json
+++ b/package.json
@@ -25,6 +25,6 @@
},
"dependencies": {
"grunt": "0.4.5",
- "grunt-jquery-content": "2.0.0"
+ "grunt-jquery-content": "2.3.0"
}
}
diff --git a/redirects.json b/redirects.json
new file mode 100644
index 00000000..2aa9b056
--- /dev/null
+++ b/redirects.json
@@ -0,0 +1,3 @@
+{
+ "/api/": "/resources/api.xml"
+}
From a32c847d29a6458331246aa259f055206b2a095f Mon Sep 17 00:00:00 2001
From: Arthur Verschaeve
Date: Thu, 30 Jul 2015 22:47:49 +0200
Subject: [PATCH 335/699] 1.11.110
---
package.json | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/package.json b/package.json
index 83004b42..7a8d53d4 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.11.109",
+ "version": "1.11.110",
"homepage": "https://github.com/jquery/api.jquery.com",
"author": {
"name": "jQuery Foundation and other contributors"
From 07b3ad769f45c0206981c51f7b2a7f8a1d54b146 Mon Sep 17 00:00:00 2001
From: Aurelio De Rosa
Date: Sun, 16 Aug 2015 23:33:26 +0100
Subject: [PATCH 336/699] Added note for Global Ajax Event Handlers
Fixes gh-479
Closes gh-797
---
entries/ajaxComplete.xml | 1 +
entries/ajaxError.xml | 1 +
entries/ajaxSend.xml | 1 +
entries/ajaxStart.xml | 1 +
entries/ajaxStop.xml | 1 +
entries/ajaxSuccess.xml | 1 +
notes.xsl | 3 +++
7 files changed, 9 insertions(+)
diff --git a/entries/ajaxComplete.xml b/entries/ajaxComplete.xml
index 7f045973..7481f97b 100644
--- a/entries/ajaxComplete.xml
+++ b/entries/ajaxComplete.xml
@@ -44,6 +44,7 @@ $( document ).ajaxComplete(function( event, xhr, settings ) {
Note: You can get the returned ajax contents by looking at xhr.responseText.
+ Show a message when an Ajax request completes.
diff --git a/entries/ajaxError.xml b/entries/ajaxError.xml
index d13f71e6..f674df42 100644
--- a/entries/ajaxError.xml
+++ b/entries/ajaxError.xml
@@ -42,6 +42,7 @@ $( document ).ajaxError(function( event, jqxhr, settings, thrownError ) {
}
});
+ Show a message when an Ajax request fails.
diff --git a/entries/ajaxSend.xml b/entries/ajaxSend.xml
index 2d609b71..0678622c 100644
--- a/entries/ajaxSend.xml
+++ b/entries/ajaxSend.xml
@@ -42,6 +42,7 @@ $( document ).ajaxSend(function( event, jqxhr, settings ) {
});
+ Show a message before an Ajax request is sent.
diff --git a/entries/ajaxStart.xml b/entries/ajaxStart.xml
index 7747e5b6..92e6cc70 100644
--- a/entries/ajaxStart.xml
+++ b/entries/ajaxStart.xml
@@ -31,6 +31,7 @@ $( ".trigger" ).click(function() {
When the user clicks the element with class trigger and the Ajax request is sent, the log message is displayed.
As of jQuery 1.8, the .ajaxStart() method should only be attached to document.
+ Show a loading message whenever an Ajax request starts (and none is already active).
diff --git a/entries/ajaxStop.xml b/entries/ajaxStop.xml
index 76b3bffc..fc0781f6 100644
--- a/entries/ajaxStop.xml
+++ b/entries/ajaxStop.xml
@@ -31,6 +31,7 @@ $( ".trigger" ).click(function() {
When the user clicks the element with class trigger and the Ajax request completes, the log message is displayed.
As of jQuery 1.8, the .ajaxStop() method should only be attached to document.
+ Hide a loading message after all the Ajax requests have stopped.
diff --git a/entries/ajaxSuccess.xml b/entries/ajaxSuccess.xml
index 26583e2e..8972b24d 100644
--- a/entries/ajaxSuccess.xml
+++ b/entries/ajaxSuccess.xml
@@ -45,6 +45,7 @@ $( document ).ajaxSuccess(function( event, xhr, settings ) {
Note: You can get the returned ajax contents by looking at xhr.responseXML or xhr.responseText for xml and html respectively.
+ Show a message when an Ajax request completes successfully.
diff --git a/notes.xsl b/notes.xsl
index 33a2c073..eb5a9c61 100644
--- a/notes.xsl
+++ b/notes.xsl
@@ -67,6 +67,9 @@
As the .() method is just a shorthand for .on( "", handler ), detaching is possible using .off( "" ).
+
+ As of jQuery 1.9, all the handlers for the jQuery global Ajax events, including those added with the method, must be attached to document.
+
From 2902fc21eebd928065e34e0292d4d034ba2b247b Mon Sep 17 00:00:00 2001
From: Aurelio De Rosa
Date: Thu, 20 Aug 2015 23:34:29 +0100
Subject: [PATCH 337/699] 1.11.111
---
package.json | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/package.json b/package.json
index 7a8d53d4..dc74663e 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.11.110",
+ "version": "1.11.111",
"homepage": "https://github.com/jquery/api.jquery.com",
"author": {
"name": "jQuery Foundation and other contributors"
From b6116995a775e0666d40adf4b121aa85ba72d754 Mon Sep 17 00:00:00 2001
From: Aurelio De Rosa
Date: Mon, 21 Sep 2015 20:48:26 +0100
Subject: [PATCH 338/699] Fixed many typos of the name Ajax
Closes gh-810
---
entries/ajaxComplete.xml | 2 +-
entries/ajaxSuccess.xml | 4 ++--
entries/jQuery.Callbacks.xml | 2 +-
entries/jQuery.ajaxPrefilter.xml | 2 +-
entries/jQuery.ajaxTransport.xml | 4 ++--
entries/jQuery.get.xml | 2 +-
entries/jQuery.getJSON.xml | 2 +-
entries/jQuery.post.xml | 4 ++--
entries/jQuery.when.xml | 4 ++--
9 files changed, 13 insertions(+), 13 deletions(-)
diff --git a/entries/ajaxComplete.xml b/entries/ajaxComplete.xml
index 7481f97b..2c26aea3 100644
--- a/entries/ajaxComplete.xml
+++ b/entries/ajaxComplete.xml
@@ -42,7 +42,7 @@ $( document ).ajaxComplete(function( event, xhr, settings ) {
}
});
-
Note: You can get the returned ajax contents by looking at xhr.responseText.
+
Note: You can get the returned Ajax contents by looking at xhr.responseText.
Note: You can get the returned ajax contents by looking at xhr.responseXML or xhr.responseText for xml and html respectively.
+
Note: You can get the returned Ajax contents by looking at xhr.responseXML or xhr.responseText for xml and html respectively.
diff --git a/entries/jQuery.Callbacks.xml b/entries/jQuery.Callbacks.xml
index c31de063..251bc111 100644
--- a/entries/jQuery.Callbacks.xml
+++ b/entries/jQuery.Callbacks.xml
@@ -259,7 +259,7 @@ dfd.done( topic.publish );
// Here the Deferred is being resolved with a message
// that will be passed back to subscribers. It's possible to
// easily integrate this into a more complex routine
-// (eg. waiting on an ajax call to complete) so that
+// (eg. waiting on an Ajax call to complete) so that
// messages are only published once the task has actually
// finished.
dfd.resolve( "it's been published!" );
diff --git a/entries/jQuery.ajaxPrefilter.xml b/entries/jQuery.ajaxPrefilter.xml
index eb762dfb..f82d8d02 100644
--- a/entries/jQuery.ajaxPrefilter.xml
+++ b/entries/jQuery.ajaxPrefilter.xml
@@ -24,7 +24,7 @@ $.ajaxPrefilter(function( options, originalOptions, jqXHR ) {
where:
options are the request options
-
originalOptions are the options as provided to the ajax method, unmodified and, thus, without defaults from ajaxSettings
+
originalOptions are the options as provided to the $.ajax() method, unmodified and, thus, without defaults from ajaxSettings
jqXHR is the jqXHR object of the request
Prefilters are a perfect fit when custom options need to be handled. Given the following code, for example, a call to $.ajax() would automatically abort a request to the same URL if the custom abortOnRetry option is set to true:
This example fetches the requested HTML snippet and inserts it on the page.
The jqXHR Object
-
As of jQuery 1.5, all of jQuery's Ajax methods return a superset of the XMLHTTPRequest object. This jQuery XHR object, or "jqXHR," returned by $.get() implements the Promise interface, giving it all the properties, methods, and behavior of a Promise (see Deferred object for more information). The jqXHR.done() (for success), jqXHR.fail() (for error), and jqXHR.always() (for completion, whether success or error) methods take a function argument that is called when the request terminates. For information about the arguments this function receives, see the jqXHR Object section of the $.ajax() documentation.
+
As of jQuery 1.5, all of jQuery's Ajax methods return a superset of the XMLHTTPRequest object. This jQuery XHR object, or "jqXHR," returned by $.get() implements the Promise interface, giving it all the properties, methods, and behavior of a Promise (see Deferred object for more information). The jqXHR.done() (for success), jqXHR.fail() (for error), and jqXHR.always() (for completion, whether success or error) methods take a function argument that is called when the request terminates. For information about the arguments this function receives, see the jqXHR Object section of the $.ajax() documentation.
The Promise interface also allows jQuery's Ajax methods, including $.get(), to chain multiple .done(), .fail(), and .always() callbacks on a single request, and even to assign these callbacks after the request may have completed. If the request is already complete, the callback is fired immediately.
// Assign handlers immediately after making the request,
diff --git a/entries/jQuery.getJSON.xml b/entries/jQuery.getJSON.xml
index 97c8b0a9..23ad5c2d 100644
--- a/entries/jQuery.getJSON.xml
+++ b/entries/jQuery.getJSON.xml
@@ -61,7 +61,7 @@ $.getJSON( "ajax/test.json", function( data ) {
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.
The jqXHR Object
-
As of jQuery 1.5, all of jQuery's Ajax methods return a superset of the XMLHTTPRequest object. This jQuery XHR object, or "jqXHR," returned by $.getJSON() implements the Promise interface, giving it all the properties, methods, and behavior of a Promise (see Deferred object for more information). The jqXHR.done() (for success), jqXHR.fail() (for error), and jqXHR.always() (for completion, whether success or error) methods take a function argument that is called when the request terminates. For information about the arguments this function receives, see the jqXHR Object section of the $.ajax() documentation.
+
As of jQuery 1.5, all of jQuery's Ajax methods return a superset of the XMLHTTPRequest object. This jQuery XHR object, or "jqXHR," returned by $.getJSON() implements the Promise interface, giving it all the properties, methods, and behavior of a Promise (see Deferred object for more information). The jqXHR.done() (for success), jqXHR.fail() (for error), and jqXHR.always() (for completion, whether success or error) methods take a function argument that is called when the request terminates. For information about the arguments this function receives, see the jqXHR Object section of the $.ajax() documentation.
The Promise interface in jQuery 1.5 also allows jQuery's Ajax methods, including $.getJSON(), to chain multiple .done(), .always(), and .fail() callbacks on a single request, and even to assign these callbacks after the request may have completed. If the request is already complete, the callback is fired immediately.
// Assign handlers immediately after making the request,
diff --git a/entries/jQuery.post.xml b/entries/jQuery.post.xml
index 8a1bdc43..982b28c7 100644
--- a/entries/jQuery.post.xml
+++ b/entries/jQuery.post.xml
@@ -100,7 +100,7 @@ $.post( "test.php", { 'choices[]': [ "Jon", "Susan" ] } );
]]>
- Send form data using ajax requests
+ Send form data using Ajax requests
@@ -132,7 +132,7 @@ $.post( "test.php", { func: "getNameAndTime" }, function( data ) {
]]>
- Post a form using ajax and put results in a div
+ Post a form using Ajax and put results in a div
-
In the multiple-Deferreds case where one of the Deferreds is rejected, jQuery.when() immediately fires the failCallbacks for its master Deferred. Note that some of the Deferreds may still be unresolved at that point. The arguments passed to the failCallbacks match the signature of the failCallback for the Deferred that was rejected. If you need to perform additional processing for this case, such as canceling any unfinished ajax requests, you can keep references to the underlying jqXHR objects in a closure and inspect/cancel them in the failCallback.
+
In the multiple-Deferreds case where one of the Deferreds is rejected, jQuery.when() immediately fires the failCallbacks for its master Deferred. Note that some of the Deferreds may still be unresolved at that point. The arguments passed to the failCallbacks match the signature of the failCallback for the Deferred that was rejected. If you need to perform additional processing for this case, such as canceling any unfinished Ajax requests, you can keep references to the underlying jqXHR objects in a closure and inspect/cancel them in the failCallback.
- Execute a function after two ajax requests are successful. (See the jQuery.ajax() documentation for a complete description of success and error cases for an ajax request).
+ Execute a function after two Ajax requests are successful. (See the jQuery.ajax() documentation for a complete description of success and error cases for an ajax request).
Date: Mon, 21 Sep 2015 01:49:40 +0100
Subject: [PATCH 339/699] Dblclick: Fixed a code style issue
Closes gh-809
---
entries/dblclick.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/entries/dblclick.xml b/entries/dblclick.xml
index f91e85da..6287b4cb 100644
--- a/entries/dblclick.xml
+++ b/entries/dblclick.xml
@@ -23,7 +23,7 @@
1.0
-
This method is a shortcut for .on( "dblclick", handler) in the first two variations, and .trigger( "dblclick" ) in the third.
+
This method is a shortcut for .on( "dblclick", handler ) in the first two variations, and .trigger( "dblclick" ) in the third.
The dblclick event is sent to an element when the element is double-clicked. Any HTML element can receive this event.
For example, consider the HTML:
From 51383334dcb3b53107ceea3cc5674bc72eee718e Mon Sep 17 00:00:00 2001
From: Aurelio De Rosa
Date: Mon, 21 Sep 2015 01:48:21 +0100
Subject: [PATCH 340/699] Dblclick: Minor improvements to wording
Closes gh-808
---
entries/dblclick.xml | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/entries/dblclick.xml b/entries/dblclick.xml
index 6287b4cb..df7a5ae4 100644
--- a/entries/dblclick.xml
+++ b/entries/dblclick.xml
@@ -47,7 +47,7 @@ $( "#target" ).dblclick(function() {
Handler for .dblclick() called.
-
To trigger the event manually, apply .dblclick() without an argument:
+
To trigger the event manually, call .dblclick() without an argument:
- To bind a "Hello World!" alert box the dblclick event on every paragraph on the page:
+ To bind a "Hello World!" alert box to the dblclick event on every paragraph on the page:
Date: Wed, 9 Sep 2015 12:32:34 -0400
Subject: [PATCH 341/699] Effects: Clarify that callbacks are per-element
Fixes gh-803
Closes gh-804
---
entries/animate.xml | 4 ++--
includes/complete-argument.xml | 2 +-
includes/options-argument.xml | 10 +++++-----
3 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/entries/animate.xml b/entries/animate.xml
index 2cbec644..11477c2a 100644
--- a/entries/animate.xml
+++ b/entries/animate.xml
@@ -32,8 +32,8 @@
Duration
Durations are given in milliseconds; higher values indicate slower animations, not faster ones. The default duration is 400 milliseconds. The strings 'fast' and 'slow' can be supplied to indicate durations of 200 and 600 milliseconds, respectively.
-
Complete Function
-
If supplied, the complete callback function 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, the callback is executed once per matched element, not once for the animation as a whole.
+
Callback Functions
+
If supplied, the start, step, progress, complete, done, fail, and always callbacks are called on a per-element basis; this is set to the DOM element being animated. If no elements are in the set, no callbacks are called. If multiple elements are animated, the callback is executed once per matched element, not once for the animation as a whole. Use the .promise() method to obtain a promise to which you can attach callbacks that fire once for an animated set of any size, including zero elements.
Basic Usage
To animate any element, such as a simple image:
diff --git a/includes/complete-argument.xml b/includes/complete-argument.xml
index 042fdf45..5d109f39 100644
--- a/includes/complete-argument.xml
+++ b/includes/complete-argument.xml
@@ -1,4 +1,4 @@
- A function to call once the animation is complete.
+ A function to call once the animation is complete, called once per matched element.
diff --git a/includes/options-argument.xml b/includes/options-argument.xml
index f62a8585..168e8648 100644
--- a/includes/options-argument.xml
+++ b/includes/options-argument.xml
@@ -41,17 +41,17 @@
- A function to call once the animation is complete.
+ A function that is called once the animation on an element is complete.
- A function to call when the animation begins.
+ A function to call when the animation on an element begins.An enhanced Promise object with additional properties for the animation
- A function to be called when the animation completes (its Promise object is resolved).
+ A function to be called when the animation on an element completes (its Promise object is resolved).An enhanced Promise object with additional properties for the animation
@@ -60,7 +60,7 @@
- A function to be called when the animation fails to complete (its Promise object is rejected).
+ A function to be called when the animation on an element fails to complete (its Promise object is rejected).An enhanced Promise object with additional properties for the animation
@@ -69,7 +69,7 @@
- A function to be called when the animation completes or stops without completing (its Promise object is either resolved or rejected).
+ A function to be called when the animation on an element completes or stops without completing (its Promise object is either resolved or rejected).An enhanced Promise object with additional properties for the animation
From be7c028a49986e94cec51481b06fcac1a23191bb Mon Sep 17 00:00:00 2001
From: Andy Li
Date: Mon, 7 Sep 2015 17:29:27 +0800
Subject: [PATCH 342/699] Events: Completed the list of copied properties
Closes gh-802
---
categories.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/categories.xml b/categories.xml
index d4941b0e..d43d8929 100644
--- a/categories.xml
+++ b/categories.xml
@@ -143,7 +143,7 @@ jQuery( "body" ).trigger( e );
The following properties are also copied to the event object, though some of their values may be undefined depending on the event:
Certain events may have properties specific to them. Those can be accessed as properties of the event.originalEvent object.
Example:
From 4746900942a4ccc7bd2463c1913aedc18bc03905 Mon Sep 17 00:00:00 2001
From: Aurelio De Rosa
Date: Mon, 21 Sep 2015 23:36:00 +0100
Subject: [PATCH 343/699] 1.11.112
---
package.json | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/package.json b/package.json
index dc74663e..ca35e147 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.11.111",
+ "version": "1.11.112",
"homepage": "https://github.com/jquery/api.jquery.com",
"author": {
"name": "jQuery Foundation and other contributors"
From ea616380521f9e47a222a1179218308a26068f21 Mon Sep 17 00:00:00 2001
From: Aurelio De Rosa
Date: Thu, 22 Jan 2015 06:39:04 +0000
Subject: [PATCH 344/699] Error: Improved image example
Fixes gh-413
Closes gh-630
---
entries/error.xml | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/entries/error.xml b/entries/error.xml
index 2b3ba94c..0fcb1810 100644
--- a/entries/error.xml
+++ b/entries/error.xml
@@ -34,22 +34,23 @@ $( "#book" )
})
.attr( "src", "missing.png" );
-
If the image cannot be loaded (for example, because it is not present at the supplied URL), the alert is displayed:
+
If the image cannot be loaded (for example, because it is not present at the supplied URL), the alert is displayed:
Handler for .error() called.
-
The event handler must be attached before the browser fires the error event, which is why the example sets the src attribute after attaching the handler. Also, the error event may not be correctly fired when the page is served locally; error relies on HTTP status codes and will generally not be triggered if the URL uses the file: protocol.
+
The event handler must be attached before the browser fires the error event, which is why the example sets the src attribute after attaching the handler. Also, the error event may not be correctly fired when the page is served locally; error relies on HTTP status codes and will generally not be triggered if the URL uses the file: protocol.
-
Note: A jQuery error event handler should not be attached to the window object. The browser fires the window's error event when a script error occurs. However, the window error event receives different arguments and has different return value requirements than conventional event handlers. Use window.onerror instead.
+
Note: A jQuery error event handler should not be attached to the window object. The browser fires the window's error event when a script error occurs. However, the window error event receives different arguments and has different return value requirements than conventional event handlers. Use window.onerror instead.
- To hide the "broken image" icons for IE users, you can try:
+ To replace all the missing images with another, you can update the src attribute inside the callback passed to .error(). Be sure that the replacement image exists; otherwise the error event will be triggered indefinitely.
From e25e39538f0dfa6cd46e33255fb99252254d176b Mon Sep 17 00:00:00 2001
From: Dmitry Gorelenkov
Date: Fri, 28 Aug 2015 19:34:30 +0200
Subject: [PATCH 345/699] jQuery.grep: Argument can be an Array-like object
Closes gh-801
---
entries/jQuery.grep.xml | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/entries/jQuery.grep.xml b/entries/jQuery.grep.xml
index 245a672d..5195ffdd 100644
--- a/entries/jQuery.grep.xml
+++ b/entries/jQuery.grep.xml
@@ -4,8 +4,8 @@
Finds the elements of an array which satisfy a filter function. The original array is not affected.1.0
-
- The array to search through.
+
+ The array-like object to search through.
From f7e567fac4cbfbce6764f106df29203c65105c1a Mon Sep 17 00:00:00 2001
From: Aurelio De Rosa
Date: Mon, 19 Oct 2015 00:32:12 +0100
Subject: [PATCH 346/699] isNumeric: argument can be anything
Closes gh-818
---
entries/jQuery.isNumeric.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/entries/jQuery.isNumeric.xml b/entries/jQuery.isNumeric.xml
index 80edc02d..c6ec81e8 100644
--- a/entries/jQuery.isNumeric.xml
+++ b/entries/jQuery.isNumeric.xml
@@ -4,7 +4,7 @@
Determines whether its argument is a number.1.7
-
+ The value to be tested.
From da5ec3328c7d9929df5ab488dfe4a504eb75d696 Mon Sep 17 00:00:00 2001
From: Aurelio De Rosa
Date: Mon, 21 Sep 2015 01:44:34 +0100
Subject: [PATCH 347/699] Added page about the contextmenu() alias
Fixes gh-806
Closes gh-807
---
entries/contextmenu.xml | 86 +++++++++++++++++++++++++++++++++++++++++
1 file changed, 86 insertions(+)
create mode 100644 entries/contextmenu.xml
diff --git a/entries/contextmenu.xml b/entries/contextmenu.xml
new file mode 100644
index 00000000..0c846169
--- /dev/null
+++ b/entries/contextmenu.xml
@@ -0,0 +1,86 @@
+
+
+ .contextmenu()
+ Bind an event handler to the "contextmenu" JavaScript event, or trigger that event on an element.
+
+ 1.0
+
+ A function to execute each time the event is triggered.
+
+
+
+
+ 1.4.3
+
+ An object containing data that will be passed to the event handler.
+
+
+ A function to execute each time the event is triggered.
+
+
+
+
+ 1.0
+
+
+
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.
+ For example, consider the HTML:
+
+<div id="target">
+ Right-click here
+</div>
+
+
The event handler can be bound to the <div> as follows:
Now right-clicking on this element displays the alert:
+
+ Handler for .contextmenu() called.
+
+
To trigger the event manually, call .contextmenu() without an argument:
+
+$( "#target" ).contextmenu();
+
+
+
+
+ To show a "Hello World!" alert box when the contextmenu event is triggered on a paragraph on the page:
+
+
+
+ Right click to toggle background color.
+
+
+
+Right click the block
+]]>
+
+
+
+
+
From d347186c65f26e5432649498202b954297b501b2 Mon Sep 17 00:00:00 2001
From: Eric Lee Carraway
Date: Tue, 3 Nov 2015 21:30:47 -0500
Subject: [PATCH 348/699] Docs(entries): Fix typos.
Closes gh-827.
---
entries/contents.xml | 2 +-
entries/jQuery.ajax.xml | 4 ++--
entries/jQuery.ajaxTransport.xml | 2 +-
entries/on.xml | 2 +-
4 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/entries/contents.xml b/entries/contents.xml
index 6f348b9b..5bfe9fc6 100644
--- a/entries/contents.xml
+++ b/entries/contents.xml
@@ -50,7 +50,7 @@ $( "p" )
]]>
- Change the background colour of links inside of an iframe.
+ Change the background color of links inside of an iframe.
diff --git a/entries/jQuery.ajax.xml b/entries/jQuery.ajax.xml
index 4c8f6686..81e3e42c 100644
--- a/entries/jQuery.ajax.xml
+++ b/entries/jQuery.ajax.xml
@@ -318,7 +318,7 @@ jqxhr.always(function() {
As of jQuery 1.5, jQuery's Ajax implementation includes prefilters, transports, and converters that allow you to extend Ajax with a great deal of flexibility.
Using Converters
-
$.ajax() converters support mapping data types to other data types. If, however, you want to map a custom data type to a known type (e.g json), you must add a correspondance between the response Content-Type and the actual data type using the contents option:
+
$.ajax() converters support mapping data types to other data types. If, however, you want to map a custom data type to a known type (e.g json), you must add a correspondence between the response Content-Type and the actual data type using the contents option:
This extra object is necessary because the response Content-Types and data types never have a strict one-to-one correspondance (hence the regular expression).
+
This extra object is necessary because the response Content-Types and data types never have a strict one-to-one correspondence (hence the regular expression).
To convert from a supported type (e.g text, json) to a custom data type and back again, use another pass-through converter:
status is the HTTP status code of the response, like 200 for a typical success, or 404 for when the resource is not found.
statusText is the statusText of the response.
-
responses (Optional) is An object containing dataType/value that contains the response in all the formats the transport could provide (for instance, a native XMLHttpRequest object would set reponses to { xml: XMLData, text: textData } for a response that is an XML document)
+
responses (Optional) is An object containing dataType/value that contains the response in all the formats the transport could provide (for instance, a native XMLHttpRequest object would set responses to { xml: XMLData, text: textData } for a response that is an XML document)
headers (Optional) is a string containing all the response headers if the transport has access to them (akin to what XMLHttpRequest.getAllResponseHeaders() would provide).
Just like prefilters, a transport's factory function can be attached to a specific dataType:
The .on() method attaches event handlers to the currently selected set of elements in the jQuery object. As of jQuery 1.7, the .on() method provides all functionality required for attaching event handlers. For help in converting from older jQuery event methods, see .bind(), .delegate(), and .live(). To remove events bound with .on(), see .off(). To attach an event that runs only once and then removes itself, see .one()
Event names and namespaces
-
Any event names can be used for the events argument. jQuery will pass through the browser's standard JavaScript event types, calling the handler function when the browser generates events due to user actions such as click. In addition, the .trigger() method can trigger both standard browser event names and custom event names to call attached handlers. Event names should only contain alphanumerics, underscore, and colon chraracters.
+
Any event names can be used for the events argument. jQuery will pass through the browser's standard JavaScript event types, calling the handler function when the browser generates events due to user actions such as click. In addition, the .trigger() method can trigger both standard browser event names and custom event names to call attached handlers. Event names should only contain alphanumerics, underscore, and colon characters.
An event name can be qualified by event namespaces that simplify removing or triggering the event. For example, "click.myPlugin.simple" defines both the myPlugin and simple namespaces for this particular click event. A click event handler attached via that string could be removed with .off("click.myPlugin") or .off("click.simple") without disturbing other click handlers attached to the elements. Namespaces are similar to CSS classes in that they are not hierarchical; only one name needs to match. Namespaces beginning with an underscore are reserved for jQuery's use.
In the second form of .on(), the events argument is a plain object. The keys are strings in the same form as the events argument with space-separated event type names and optional namespaces. The value for each key is a function (or false value) that is used as the handler instead of the final argument to the method. In other respects, the two forms are identical in their behavior as described below.
Direct and delegated events
From 320265a67851969e02837b88f14802d93ef8e7fc Mon Sep 17 00:00:00 2001
From: Karl Swedberg
Date: Tue, 3 Nov 2015 21:39:51 -0500
Subject: [PATCH 349/699] Release 1.11.113
---
package.json | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/package.json b/package.json
index ca35e147..f9206b26 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.11.112",
+ "version": "1.11.113",
"homepage": "https://github.com/jquery/api.jquery.com",
"author": {
"name": "jQuery Foundation and other contributors"
From 1cb336132d804c87f8a580c65e9d79b45e3730c9 Mon Sep 17 00:00:00 2001
From: Aurelio De Rosa
Date: Sat, 31 Oct 2015 13:15:53 +0000
Subject: [PATCH 350/699] Error: Added deprecation note
Closes gh-824
---
entries/error.xml | 1 +
1 file changed, 1 insertion(+)
diff --git a/entries/error.xml b/entries/error.xml
index 0fcb1810..872ff70d 100644
--- a/entries/error.xml
+++ b/entries/error.xml
@@ -21,6 +21,7 @@
This method is a shortcut for .on( "error", handler ).
+
As of jQuery 1.8, the .error() method is deprecated. Use .on( "error", handler ) to attach event handlers to the error event instead.
The error event is sent to elements, such as images, that are referenced by a document and loaded by the browser. It is called if the element was not loaded correctly.
For example, consider a page with a simple image element:
Note that the target value of the height property is 'toggle'. Since the image was visible before, the animation shrinks the height to 0 to hide it. A second click then reverses this transition:
-
+
+
+ figure 2
+
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.
diff --git a/entries/click.xml b/entries/click.xml
index 206edf99..c6e9b168 100644
--- a/entries/click.xml
+++ b/entries/click.xml
@@ -34,9 +34,10 @@
Trigger the handler
</div>
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.
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.
With duration set to 0, this method just changes the opacity CSS property, so .fadeTo( 0, opacity ) is the same as .css( "opacity", opacity ).
diff --git a/entries/height.xml b/entries/height.xml
index 7efdf312..548af238 100644
--- a/entries/height.xml
+++ b/entries/height.xml
@@ -9,9 +9,10 @@
Get the current computed height for the first element in the set of matched elements.
The difference between .css( "height" ) and .height() is that the latter returns a unit-less pixel value (for example, 400) while the former returns a value with units intact (for example, 400px). The .height() method is recommended when an element's height needs to be used in a mathematical calculation.
-
+
-
+ figure 1
+
This method is also able to find the height of the window and document.
The top and bottom padding and border are always included in the .outerHeight() calculation; if the includeMargin argument is set to true, the margin (top and bottom) is also included.
This method is not applicable to window and document objects; for these, use .height() instead.
Returns the width of the element, along with left and right padding, border, and optionally margin, in pixels.
If includeMargin is omitted or false, the padding and border are included in the calculation; if true, the margin is also included.
This method is not applicable to window and document objects; for these, use .width() instead. Although .outerWidth() can be used on table elements, it may give unexpected results on tables using the border-collapse: collapse CSS property.
When calling .outerWidth(value), the value can be either a string (number and unit) or a number. If only a number is provided for the value, jQuery assumes a pixel unit. If a string is provided, however, any valid CSS measurement may be used (such as 100px, 50%, or auto).
-
+
Change the outer width of each div the first time it is clicked (and change its color).d
]]>
-
+
diff --git a/entries/scroll.xml b/entries/scroll.xml
index 8597018b..1a0e9cbd 100644
--- a/entries/scroll.xml
+++ b/entries/scroll.xml
@@ -43,9 +43,10 @@
<div id="log"></div>
The style definition is present to make the target element small enough to be scrollable:
-
+
-
+ figure 1
+
The scroll event handler can be bound to this element:
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.
With the element initially shown, we can hide it slowly with the first click:
-
-
-
-
-
-
+
+
+
+
+
+ figure 1
+
A second click will show the element once again:
-
-
-
-
-
-
+
+
+
+
+
+ figure 2
+
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.
With the element initially shown, we can hide it slowly with the first click:
-
-
-
-
-
-
+
+
+
+
+
+ figure 1
+
A second click will show the element once again:
-
-
-
-
-
-
+
+
+
+
+
+ figure 2
+
The second version of the method accepts a Boolean parameter. If this parameter is true, then the matched elements are shown; if false, the elements are hidden. In essence, the statement:
diff --git a/entries/width.xml b/entries/width.xml
index 11fc2ebf..abc8aff3 100644
--- a/entries/width.xml
+++ b/entries/width.xml
@@ -9,9 +9,10 @@
Get the current computed width for the first element in the set of matched elements.
The difference between .css(width) and .width() is that the latter returns a unit-less pixel value (for example, 400) while the former returns a value with units intact (for example, 400px). The .width() method is recommended when an element's width needs to be used in a mathematical calculation.
-
+
-
+ figure 1
+
This method is also able to find the width of the window and document.
// Returns width of browser viewport
From 69e0e2ac4b9f19433c8d491b3772eec8c558111b Mon Sep 17 00:00:00 2001
From: Anne-Gaelle Colom
Date: Wed, 2 Dec 2015 21:08:32 +0000
Subject: [PATCH 352/699] 1.11.114
---
package.json | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/package.json b/package.json
index f9206b26..673192ac 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.11.113",
+ "version": "1.11.114",
"homepage": "https://github.com/jquery/api.jquery.com",
"author": {
"name": "jQuery Foundation and other contributors"
From 8e70d52f767f2ffb92beb884752579db6483ceda Mon Sep 17 00:00:00 2001
From: Andy Li
Date: Sun, 13 Dec 2015 01:10:38 +0800
Subject: [PATCH 353/699] index: Document return value as integer
Closes gh-845
---
entries/index.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/entries/index.xml b/entries/index.xml
index ecd46243..efcde43c 100644
--- a/entries/index.xml
+++ b/entries/index.xml
@@ -1,5 +1,5 @@
-
+.index()1.4
From d1e8d47ea5089aa88768568adce4d11c8db7c1f5 Mon Sep 17 00:00:00 2001
From: Nabil Kadimi
Date: Sun, 6 Dec 2015 22:11:13 +0000
Subject: [PATCH 354/699] event.stopPropagation: Minor improvement
Closes gh-844
---
entries/event.stopPropagation.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/entries/event.stopPropagation.xml b/entries/event.stopPropagation.xml
index 923b9587..adf4ea10 100644
--- a/entries/event.stopPropagation.xml
+++ b/entries/event.stopPropagation.xml
@@ -7,7 +7,7 @@
Prevents the event from bubbling up the DOM tree, preventing any parent handlers from being notified of the event.
This method works for custom events triggered with trigger(), as well.
+
This method works for custom events triggered with trigger() as well.
Note that this will not prevent other handlers on the same element from running.
From b023cc01bb213ca3bd15dff6c4bcfc07c9664125 Mon Sep 17 00:00:00 2001
From: Aurelio De Rosa
Date: Tue, 6 Oct 2015 21:20:20 +0100
Subject: [PATCH 355/699] Document that addClass and removeClass change the
property
Fixes gh-312
Closes gh-813
---
entries/addClass.xml | 1 +
entries/removeClass.xml | 1 +
2 files changed, 2 insertions(+)
diff --git a/entries/addClass.xml b/entries/addClass.xml
index 476251d8..69274708 100644
--- a/entries/addClass.xml
+++ b/entries/addClass.xml
@@ -19,6 +19,7 @@
Adds the specified class(es) to each element in the set of matched elements.
It's important to note that this method does not replace a class. It simply adds the class, appending it to any which may already be assigned to the elements.
+
The .addClass() method manipulates the classNameproperty of the selected elements, not the classattribute. Once the property is changed, it's the browser that updates the attribute accordingly. An implication of this behavior is that this method only works for documents with HTML DOM semantics (e.g., not pure XML documents).
More than one class may be added at a time, separated by a space, to the set of matched elements, like so:
$( "p" ).addClass( "myClass yourClass" );
diff --git a/entries/removeClass.xml b/entries/removeClass.xml
index 8bb11196..3263e3a3 100644
--- a/entries/removeClass.xml
+++ b/entries/removeClass.xml
@@ -19,6 +19,7 @@
Remove a single class, multiple classes, or all classes from each element in the set of matched elements.
If a class name is included as a parameter, then only that class will be removed from the set of matched elements. If no class names are specified in the parameter, all classes will be removed.
+
The .removeClass() method manipulates the classNameproperty of the selected elements, not the classattribute. Once the property is changed, it's the browser that updates the attribute accordingly. This means that when the class attribute is updated and the last class name is removed, the browser may set the attribute's value to an empty string instead of removing the attribute completely. An implication of this behavior is that this method only works for documents with HTML DOM semantics (e.g., not pure XML documents).
More than one class may be removed at a time, separated by a space, from the set of matched elements, like so:
When the user clicks the element with class trigger and the Ajax request completes, the log message is displayed.
-
As of jQuery 1.8, the .ajaxComplete() method should only be attached to document.
All ajaxComplete handlers are invoked, regardless of what Ajax request was completed. If you must differentiate between the requests, use the parameters passed to the handler. Each time an ajaxComplete handler is executed, it is passed the event object, the XMLHttpRequest object, and the settings object that was used in the creation of the request. For example, you can restrict the callback to only handling events dealing with a particular URL:
When the user clicks the button and the Ajax request fails, because the requested file is missing, the log message is displayed.
-
As of jQuery 1.8, the .ajaxError() method should only be attached to document.
All ajaxError handlers are invoked, regardless of what Ajax request was completed. To differentiate between the requests, use the parameters passed to the handler. Each time an ajaxError handler is executed, it is passed the event object, the jqXHR object (prior to jQuery 1.5, the XHR object), and the settings object that was used in the creation of the request. When an HTTP error occurs, the fourth argument (thrownError) receives the textual portion of the HTTP status, such as "Not Found" or "Internal Server Error." For example, to restrict the error callback to only handling events dealing with a particular URL:
When the user clicks the element with class trigger and the Ajax request is about to begin, the log message is displayed.
-
As of jQuery 1.8, the .ajaxSend() method should only be attached to document.
All ajaxSend handlers are invoked, regardless of what Ajax request is to be sent. If you must differentiate between the requests, use the parameters passed to the handler. Each time an ajaxSend handler is executed, it is passed the event object, the jqXHR object (in version 1.4, XMLHttpRequestobject), and the settings object that was used in the creation of the Ajax request. For example, you can restrict the callback to only handling events dealing with a particular URL:
When the user clicks the element with class trigger and the Ajax request completes successfully, the log message is displayed.
-
As of jQuery 1.8, the .ajaxSuccess() method should only be attached to document.
All ajaxSuccess handlers are invoked, regardless of what Ajax request was completed. If you must differentiate between the requests, you can use the parameters passed to the handler. Each time an ajaxSuccess handler is executed, it is passed the event object, the XMLHttpRequest object, and the settings object that was used in the creation of the request. For example, you can restrict the callback to only handling events dealing with a particular URL:
$( document ).ajaxSuccess(function( event, xhr, settings ) {
From db305e638f5142decaa4e962e70cd8de89cbca8b Mon Sep 17 00:00:00 2001
From: Aurelio De Rosa
Date: Tue, 15 Dec 2015 10:26:52 +0000
Subject: [PATCH 357/699] Note that Types page is not a comprehensive guide
Fixes gh-832
Closes gh-850
---
pages/Types.html | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pages/Types.html b/pages/Types.html
index 18e0ee5b..fbf2bf80 100644
--- a/pages/Types.html
+++ b/pages/Types.html
@@ -9,7 +9,7 @@
ol ul li { font-size: 1em !important; }
ol ul { margin-left: 1.5em !important; }
-
JavaScript provides several built-in datatypes. In addition to those, this page documents virtual types like Selectors, enhanced pseudo-types like Events and all and everything you wanted to know about Functions.
+
JavaScript provides several built-in datatypes. In addition to those, this page documents virtual types like Selectors, enhanced pseudo-types like Events and some concepts you need to know about Functions. If you want to study these concepts in depth, take a look at MDN.
You should be able to try out most of the examples below by just copying them to your browser's JavaScript Console (Chrome, Safari with Develop menu activated, IE 8+) or Firebug console (Firefox).
From 4cd3452c32196332fd72c03f571b6a8afdc91e43 Mon Sep 17 00:00:00 2001
From: Aurelio De Rosa
Date: Wed, 16 Dec 2015 00:22:40 +0000
Subject: [PATCH 358/699] Added performance warning to show and hide
Fixes gh-816
Closes gh-852
---
entries/hide.xml | 3 +++
entries/show.xml | 3 +++
2 files changed, 6 insertions(+)
diff --git a/entries/hide.xml b/entries/hide.xml
index 1a0093d5..91916a8e 100644
--- a/entries/hide.xml
+++ b/entries/hide.xml
@@ -37,6 +37,9 @@ $( ".target" ).hide();
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.
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.
+
We can animate any element, such as a simple image:
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.
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.
+
We can animate any element, such as a simple image:
<div id="clickme">
From c000f3fb055f7f6611802c1a78b1221ed30791cb Mon Sep 17 00:00:00 2001
From: Aurelio De Rosa
Date: Mon, 14 Dec 2015 20:56:49 +0000
Subject: [PATCH 359/699] Note that :visible is the opposite of :hidden
Fixes gh-838
Closes gh-848
---
entries/hidden-selector.xml | 1 +
entries/visible-selector.xml | 1 +
2 files changed, 2 insertions(+)
diff --git a/entries/hidden-selector.xml b/entries/hidden-selector.xml
index 6712c736..2c2e6e2c 100644
--- a/entries/hidden-selector.xml
+++ b/entries/hidden-selector.xml
@@ -16,6 +16,7 @@
Elements with visibility: hidden or opacity: 0 are considered to be visible, since they still consume space in the layout. During animations that hide an element, the element is considered to be visible until the end of the animation.
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.
Elements are considered visible if they consume space in the document. Visible elements have a width or height that is greater than zero.
Elements with visibility: hidden or opacity: 0 are considered visible, since they still consume space in the layout.
Elements that are not in a document are considered hidden; 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 :hidden selector. So, every element selected by :visible isn't selected by :hidden and vice versa.
All option elements are considered hidden, regardless of their selected state.
During animations that hide an element, the element is considered visible until the end of the animation. During animations to show an element, the element is considered visible at the start at the animation.
How :visible is calculated was changed in jQuery 1.3.2. The release notes outline the changes in more detail.
From 68cb1c6ef1ba835486ef0e9e664a72e3fa9f21f2 Mon Sep 17 00:00:00 2001
From: Aurelio De Rosa
Date: Wed, 16 Dec 2015 18:27:07 +0000
Subject: [PATCH 360/699] 1.11.116
---
package.json | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/package.json b/package.json
index 673192ac..14b6ded5 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.11.114",
+ "version": "1.11.116",
"homepage": "https://github.com/jquery/api.jquery.com",
"author": {
"name": "jQuery Foundation and other contributors"
From aab36ba0238c3c6f48ffcbc164da2789ccb55e3f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Scott=20Gonz=C3=A1lez?=
Date: Thu, 17 Dec 2015 13:24:04 -0500
Subject: [PATCH 361/699] Build: Upgrade to grunt-jquery-content 3.0.0
---
package.json | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/package.json b/package.json
index 14b6ded5..fc919412 100644
--- a/package.json
+++ b/package.json
@@ -25,6 +25,6 @@
},
"dependencies": {
"grunt": "0.4.5",
- "grunt-jquery-content": "2.3.0"
+ "grunt-jquery-content": "3.0.0"
}
}
From b49f84466b890e476f4427a0b9029e22302fd175 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Scott=20Gonz=C3=A1lez?=
Date: Thu, 17 Dec 2015 13:24:13 -0500
Subject: [PATCH 362/699] 1.11.117
---
package.json | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/package.json b/package.json
index fc919412..25fab7fc 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.11.116",
+ "version": "1.11.117",
"homepage": "https://github.com/jquery/api.jquery.com",
"author": {
"name": "jQuery Foundation and other contributors"
From a232f008344f25ce53b9f1b8a217890f6009d13b Mon Sep 17 00:00:00 2001
From: Mike Pennisi
Date: Sat, 19 Dec 2015 15:33:53 -0500
Subject: [PATCH 363/699] attr: Document attr(key, null) to remove attribute
Fixes gh-523
Closes gh-853
---
entries/attr.xml | 3 ++-
pages/Types.html | 3 +++
2 files changed, 5 insertions(+), 1 deletion(-)
diff --git a/entries/attr.xml b/entries/attr.xml
index 203c61c8..40c94de1 100644
--- a/entries/attr.xml
+++ b/entries/attr.xml
@@ -147,7 +147,8 @@ The title of the emphasis is:
- A value to set for the attribute.
+
+ A value to set for the attribute. If null, the specified attribute will be removed (as in .removeAttr()).
diff --git a/pages/Types.html b/pages/Types.html
index fbf2bf80..4890df38 100644
--- a/pages/Types.html
+++ b/pages/Types.html
@@ -432,6 +432,9 @@
PlainObject
jQuery.isPlainObject( o ); // true
+
Null
+
The null keyword is a JavaScript literal that is commonly used to express the absence of an intentional value.
+
Date
The Date type is a JavaScript object that represents a single moment in time. Date objects are instantiated using their constructor function, which by default creates an object that represents the current date and time.
- figure 1
+ Figure 1 - Illustration of the specified animation effect
Note that the target value of the height property is 'toggle'. Since the image was visible before, the animation shrinks the height to 0 to hide it. A second click then reverses this transition:
@@ -66,7 +66,7 @@ $( "#clickme" ).click(function() {
- figure 2
+ Figure 2 - Illustration of the specified animation effect
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.
diff --git a/entries/click.xml b/entries/click.xml
index c6e9b168..56475da4 100644
--- a/entries/click.xml
+++ b/entries/click.xml
@@ -36,7 +36,7 @@
- figure 1
+ Figure 1 - Illustration of the rendered HTML
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.
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.
The difference between .css( "height" ) and .height() is that the latter returns a unit-less pixel value (for example, 400) while the former returns a value with units intact (for example, 400px). The .height() method is recommended when an element's height needs to be used in a mathematical calculation.
- figure 1
+ Figure 1 - Illustration of the measured height
This method is also able to find the height of the window and document.
This method is not applicable to window and document objects; for these, use .height() instead.
- figure 1
+ Figure 1 - Illustration of the measured height
diff --git a/entries/outerWidth.xml b/entries/outerWidth.xml
index f39fe926..24861c8e 100644
--- a/entries/outerWidth.xml
+++ b/entries/outerWidth.xml
@@ -16,7 +16,7 @@
This method is not applicable to window and document objects; for these, use .width() instead. Although .outerWidth() can be used on table elements, it may give unexpected results on tables using the border-collapse: collapse CSS property.
- figure 1
+ Figure 1 - Illustration of the measured width
diff --git a/entries/scroll.xml b/entries/scroll.xml
index 1a0e9cbd..8529cb0c 100644
--- a/entries/scroll.xml
+++ b/entries/scroll.xml
@@ -45,7 +45,7 @@
The style definition is present to make the target element small enough to be scrollable:
- figure 1
+ Figure 1 - Illustration of the rendered HTML
The scroll event handler can be bound to this element:
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.
diff --git a/entries/slideToggle.xml b/entries/slideToggle.xml
index d6cd26b0..12b97ad1 100644
--- a/entries/slideToggle.xml
+++ b/entries/slideToggle.xml
@@ -42,7 +42,7 @@ $( "#clickme" ).click(function() {
- figure 1
+ Figure 1 - Illustration of the slideToggle() effect when hiding the image
A second click will show the element once again:
@@ -50,7 +50,7 @@ $( "#clickme" ).click(function() {
- figure 2
+ Figure 2 - Illustration of the slideToggle() effect when showing the image
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.
diff --git a/entries/toggle.xml b/entries/toggle.xml
index 26f85aa0..6c290220 100644
--- a/entries/toggle.xml
+++ b/entries/toggle.xml
@@ -64,7 +64,7 @@ $( "#clickme" ).click(function() {
- figure 1
+ Figure 1 - Illustration of the toggle() effect when hiding the image
A second click will show the element once again:
@@ -72,7 +72,7 @@ $( "#clickme" ).click(function() {
- figure 2
+ Figure 2 - Illustration of the toggle() effect when showing the image
The second version of the method accepts a Boolean parameter. If this parameter is true, then the matched elements are shown; if false, the elements are hidden. In essence, the statement:
The difference between .css(width) and .width() is that the latter returns a unit-less pixel value (for example, 400) while the former returns a value with units intact (for example, 400px). The .width() method is recommended when an element's width needs to be used in a mathematical calculation.
- figure 1
+ Figure 1 - Illustration of the measured width
This method is also able to find the width of the window and document.
From 9560239d82c44ec98bcf5137ade9fb7e6f5eef9d Mon Sep 17 00:00:00 2001
From: Aurelio De Rosa
Date: Mon, 14 Dec 2015 23:53:26 +0000
Subject: [PATCH 365/699] jQuery.speed: Created entry
Fixes gh-830
Closes gh-849
---
entries/jQuery.speed.xml | 46 ++++++++++++++++++++++++++++++++++++++++
1 file changed, 46 insertions(+)
create mode 100644 entries/jQuery.speed.xml
diff --git a/entries/jQuery.speed.xml b/entries/jQuery.speed.xml
new file mode 100644
index 00000000..cb5ea916
--- /dev/null
+++ b/entries/jQuery.speed.xml
@@ -0,0 +1,46 @@
+
+
+ jQuery.speed
+ Creates an object containing a set of properties ready to be used in the definition of custom animations.
+
+ 1.0
+
+
+
+ A string indicating which easing function to use for the transition.
+
+
+ A function to call once the animation is complete.
+
+
+
+
+ 1.1
+
+
+
+
+
+ 1.1
+
+
+ A string or number determining how long the animation will run.
+
+
+
+
+ A string indicating which easing function to use for the transition.
+
+
+ A function to call once the animation is complete.
+
+
+
+
+
The $.speed() method provides a way to define properties, such as duration, easing, and queue, to use in a custom animation. By using it, you don't have to implement the logic that deals with default values and optional parameters.
+
This method is meant for plugin developers who are creating new animation methods. Letting $.speed() do all the parameter hockey and normalization for you, rather than duplicating the logic yourself, makes your work simpler. An example of use can be found in the animated form of .addClass() of jQuery UI.
+
+
+
+
+
From 0811e8f152a3e3665af696dd308940189d6f6339 Mon Sep 17 00:00:00 2001
From: Timmy Willison
Date: Thu, 7 Jan 2016 16:02:35 -0500
Subject: [PATCH 366/699] Manipulation: fix after/before xml parsing
Closes gh-859
---
entries/after.xml | 4 ++--
entries/before.xml | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/entries/after.xml b/entries/after.xml
index 1e195510..ee63cbf7 100644
--- a/entries/after.xml
+++ b/entries/after.xml
@@ -30,9 +30,9 @@
-
+ 1.10
-
+ A function that returns an HTML string, DOM element(s), or jQuery object to insert after each element in the set of matched elements. Receives the index position of the element in the set and the old HTML value of the element as arguments. Within the function, this refers to the current element in the set.
diff --git a/entries/before.xml b/entries/before.xml
index cba817a9..6a388ca4 100644
--- a/entries/before.xml
+++ b/entries/before.xml
@@ -33,7 +33,7 @@
1.10
-
+
From cd7119b5d423e91b92594ebb99b2e8483a91c3f6 Mon Sep 17 00:00:00 2001
From: Arthur Verschaeve
Date: Thu, 7 May 2015 21:55:42 +0200
Subject: [PATCH 367/699] jQuery.uniqueSort: add new entry, deprecate
`jQuery.unique()`
Fixes gh-731
Closes gh-736
---
entries/jQuery.unique.xml | 3 ++-
entries/jQuery.uniqueSort.xml | 45 +++++++++++++++++++++++++++++++++++
2 files changed, 47 insertions(+), 1 deletion(-)
create mode 100644 entries/jQuery.uniqueSort.xml
diff --git a/entries/jQuery.unique.xml b/entries/jQuery.unique.xml
index 0546cfa7..b31ce023 100644
--- a/entries/jQuery.unique.xml
+++ b/entries/jQuery.unique.xml
@@ -1,5 +1,5 @@
-
+jQuery.unique()1.1.3
@@ -9,6 +9,7 @@
Sorts an array of DOM elements, in place, with the duplicates removed. Note that this only works on arrays of DOM elements, not strings or numbers.
+
As of jQuery 3.0, this method is deprecated and just an alias of jQuery.uniqueSort(). Please use that method instead.
The $.unique() function searches through an array of objects, sorting the array, and removing any duplicate nodes. A node is considered a duplicate if it is the exact same node as one already in the array; two different nodes with identical attributes are not considered to be duplicates. This function only works on plain JavaScript arrays of DOM elements, and is chiefly used internally by jQuery. You probably will never need to use it.
As of jQuery 1.4 the results will always be returned in document order.
diff --git a/entries/jQuery.uniqueSort.xml b/entries/jQuery.uniqueSort.xml
new file mode 100644
index 00000000..0bccb245
--- /dev/null
+++ b/entries/jQuery.uniqueSort.xml
@@ -0,0 +1,45 @@
+
+
+ jQuery.uniqueSort()
+
+ 3.0
+
+ The Array of DOM elements.
+
+
+ Sorts an array of DOM elements, in place, with the duplicates removed. Note that this only works on arrays of DOM elements, not strings or numbers.
+
+
The $.uniqueSort() function searches through an array of objects, sorting the array, and removing any duplicate nodes. A node is considered a duplicate if it is the exact same node as one already in the array; two different nodes with identical attributes are not considered to be duplicates. This function only works on plain JavaScript arrays of DOM elements, and is chiefly used internally by jQuery. You probably will never need to use it.
+
Prior to jQuery 3.0, this method was called jQuery.unique().
+
As of jQuery 1.4 the results will always be returned in document order.
+
+
+ Removes any duplicate elements from the array of divs.
+
+
+ There are 6 divs in this document.
+
+
+
+
+
+]]>
+
+
+
From 4a2f3836f5a02501fc32d7c946b8ca35530cebe9 Mon Sep 17 00:00:00 2001
From: Aurelio De Rosa
Date: Mon, 14 Dec 2015 02:04:06 +0000
Subject: [PATCH 368/699] Document that addClass and removeClass change the
attribute
Fixes gh-814
Closes gh-846
---
entries/addClass.xml | 3 ++-
entries/removeClass.xml | 3 ++-
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/entries/addClass.xml b/entries/addClass.xml
index 69274708..5dd99ec5 100644
--- a/entries/addClass.xml
+++ b/entries/addClass.xml
@@ -19,7 +19,8 @@
Adds the specified class(es) to each element in the set of matched elements.
It's important to note that this method does not replace a class. It simply adds the class, appending it to any which may already be assigned to the elements.
-
The .addClass() method manipulates the classNameproperty of the selected elements, not the classattribute. Once the property is changed, it's the browser that updates the attribute accordingly. An implication of this behavior is that this method only works for documents with HTML DOM semantics (e.g., not pure XML documents).
+
Before jQuery version 1.12/2.2, the .addClass() method manipulated the classNameproperty of the selected elements, not the classattribute. Once the property was changed, it was the browser that updated the attribute accordingly. An implication of this behavior was that this method only worked for documents with HTML DOM semantics (e.g., not pure XML documents).
+
As of jQuery 1.12/2.2, this behavior is changed to improve the support for XML documents, including SVG. Starting from this version, the classattribute is used instead. So, .addClass() can be used on XML or SVG documents.
More than one class may be added at a time, separated by a space, to the set of matched elements, like so:
$( "p" ).addClass( "myClass yourClass" );
diff --git a/entries/removeClass.xml b/entries/removeClass.xml
index 3263e3a3..a35954e9 100644
--- a/entries/removeClass.xml
+++ b/entries/removeClass.xml
@@ -19,7 +19,8 @@
Remove a single class, multiple classes, or all classes from each element in the set of matched elements.
If a class name is included as a parameter, then only that class will be removed from the set of matched elements. If no class names are specified in the parameter, all classes will be removed.
-
The .removeClass() method manipulates the classNameproperty of the selected elements, not the classattribute. Once the property is changed, it's the browser that updates the attribute accordingly. This means that when the class attribute is updated and the last class name is removed, the browser may set the attribute's value to an empty string instead of removing the attribute completely. An implication of this behavior is that this method only works for documents with HTML DOM semantics (e.g., not pure XML documents).
+
Before jQuery version 1.12/2.2, the .removeClass() method manipulated the classNameproperty of the selected elements, not the classattribute. Once the property was changed, it was the browser that updated the attribute accordingly. This means that when the class attribute was updated and the last class name was removed, the browser might have set the attribute's value to an empty string instead of removing the attribute completely. An implication of this behavior was that this method only worked for documents with HTML DOM semantics (e.g., not pure XML documents).
+
As of jQuery 1.12/2.2, this behavior is changed to improve the support for XML documents, including SVG. Starting from this version, the classattribute is used instead. So, .removeClass() can be used on XML or SVG documents.
More than one class may be removed at a time, separated by a space, from the set of matched elements, like so:
$( "p" ).removeClass( "myClass yourClass" )
From 9ddc0201846c229e8cf9adb81a8b96b9c53e67bd Mon Sep 17 00:00:00 2001
From: Timmy Willison
Date: Mon, 28 Dec 2015 11:09:49 -0500
Subject: [PATCH 369/699] Ajax: new signature for post/get was added in
1.12/2.2
---
entries/jQuery.get.xml | 14 +++++++-------
entries/jQuery.post.xml | 6 +++---
2 files changed, 10 insertions(+), 10 deletions(-)
diff --git a/entries/jQuery.get.xml b/entries/jQuery.get.xml
index c3f18cac..a4e2bcdb 100644
--- a/entries/jQuery.get.xml
+++ b/entries/jQuery.get.xml
@@ -1,12 +1,6 @@
jQuery.get()
-
- 3.0
-
- A set of key/value pairs that configure the Ajax request. All properties except for url are optional. A default can be set for any option with $.ajaxSetup(). See jQuery.ajax( settings ) for a complete list of all settings. The type option will automatically be set to GET.
-
- 1.0
@@ -24,7 +18,13 @@
A callback function that is executed if the request succeeds. Required if dataType is provided, but you can use null or jQuery.noop as a placeholder.
- The type of data expected from the server. Default: Intelligent Guess (xml, json, script, or html).
+ The type of data expected from the server. Default: Intelligent Guess (xml, json, script, text, html).
+
+
+
+ 1.12/2.2
+
+ A set of key/value pairs that configure the Ajax request. All properties except for url are optional. A default can be set for any option with $.ajaxSetup(). See jQuery.ajax( settings ) for a complete list of all settings. The type option will automatically be set to GET.Load data from the server using a HTTP GET request.
diff --git a/entries/jQuery.post.xml b/entries/jQuery.post.xml
index 982b28c7..0ca6c139 100644
--- a/entries/jQuery.post.xml
+++ b/entries/jQuery.post.xml
@@ -12,9 +12,9 @@
A plain object or string that is sent to the server with the request.
-
+
-
+ A callback function that is executed if the request succeeds. Required if dataType is provided, but can be null in that case.
@@ -22,7 +22,7 @@
- 3.0
+ 1.12/2.2A set of key/value pairs that configure the Ajax request. All properties except for url are optional. A default can be set for any option with $.ajaxSetup(). See jQuery.ajax( settings ) for a complete list of all settings. Type will automatically be set to POST.
From 82c1f4c57d31142a4851d50cad4a0233a8c27036 Mon Sep 17 00:00:00 2001
From: Timmy Willison
Date: Mon, 28 Dec 2015 11:10:25 -0500
Subject: [PATCH 370/699] Uniquesort: added in 1.12/2.2
---
entries/jQuery.uniqueSort.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/entries/jQuery.uniqueSort.xml b/entries/jQuery.uniqueSort.xml
index 0bccb245..a1927bda 100644
--- a/entries/jQuery.uniqueSort.xml
+++ b/entries/jQuery.uniqueSort.xml
@@ -2,7 +2,7 @@
jQuery.uniqueSort()
- 3.0
+ 1.12/2.2The Array of DOM elements.
From cc0604bb4d075031d083ca3fd27c0a0aac2df80f Mon Sep 17 00:00:00 2001
From: Timmy Willison
Date: Thu, 7 Jan 2016 16:01:45 -0500
Subject: [PATCH 371/699] jQuery.htmlPrefilter: add new entry
Fixes gh-727
Close gh-858
---
entries/jQuery.htmlPrefilter.xml | 77 ++++++++++++++++++++++++++++++++
1 file changed, 77 insertions(+)
create mode 100644 entries/jQuery.htmlPrefilter.xml
diff --git a/entries/jQuery.htmlPrefilter.xml b/entries/jQuery.htmlPrefilter.xml
new file mode 100644
index 00000000..3682ed5b
--- /dev/null
+++ b/entries/jQuery.htmlPrefilter.xml
@@ -0,0 +1,77 @@
+
+
+ jQuery.htmlPrefilter()
+ Modify and filter HTML strings passed through jQuery manipulation methods.
+
+ 1.12/2.2
+
+ The HTML string on which to operate.
+
+
+
+
This method rarely needs to be called directly. Instead, use it as an entry point to modify existing jQuery manipulation methods. For instance, to remove all <del> tags from incoming HTML strings, do this:
This function can also be overwritten in order to bypass certain edge case issues. The default htmlPrefilter function in jQuery will greedily ensure that all tags are XHTML-compliant. This includes anything that looks like an HTML tag, but is actually within a string (e.g.
<a title="<div />"><>
). The jQuery.htmlPrefilter() function can be used to bypass this:
+
+$.htmlPrefilter = function( html ) {
+ // Return HTML strings unchanged
+ return html;
+};
+
+
However, while the above fix is short and simple, it puts the burden on you to ensure XHTML-compliant tags in any HTML strings. A more thorough fix for this issue would be this:
+
+var panything = "[\\w\\W]*?",
+
+ // Whitespace
+ // https://html.spec.whatwg.org/multipage/infrastructure.html#space-character
+ pspace = "[\\x20\\t\\r\\n\\f]",
+
+ // End of tag name (whitespace or greater-than)
+ pnameEnd = pspace.replace( "]", ">]" ),
+
+ // Tag name (a leading letter, then almost anything)
+ // https://html.spec.whatwg.org/multipage/syntax.html#tag-open-state
+ // https://html.spec.whatwg.org/multipage/syntax.html#tag-name-state
+ pname = "[a-z]" + pnameEnd.replace( "[", "[^/\\0" ) + "*",
+
+ // Void element (end tag prohibited)
+ // https://html.spec.whatwg.org/multipage/syntax.html#void-elements
+ pvoidName = "(?:area|base|br|col|embed|hr|img|input|keygen|link|menuitem|meta|param|" +
+ "source|track|wbr)(?=" + pnameEnd + ")",
+
+ // Attributes (double-quoted value, single-quoted value, unquoted value, or no value)
+ // https://html.spec.whatwg.org/multipage/syntax.html#attributes-2
+ pattrs = "(?:" + pspace + "+[^\\0-\\x20\\x7f-\\x9f=\"'/>]+(?:" + pspace + "*=" + pspace +
+ "*(?:\"" + panything + "\"|'" + panything + "'|" +
+ pnameEnd.replace( "[", "[^" ) + "*(?!/)" +
+ ")|))*" + pspace + "*",
+
+ // Trailing content of a close tag
+ pcloseTail = "(?:" + pspace + panything + "|)",
+
+ rspecialHtml = new RegExp(
+ // Non-void element that self-closes: $1–$5
+ "(<)(?!" + pvoidName + ")(" + pname + ")(" + pattrs + ")(\\/)(>)|" +
+ // No-innerHTML container (element, comment, or CDATA): $6
+ "(<(script|style|textarea)" + pattrs + ">" + panything + "<\\/\\7" + pcloseTail + ">|" +
+ "<!--" + panything + "--)",
+ "gi"
+ ),
+
+ // "<"; element name; attributes; ">"; "<"; "/"; element name; ">"; no-innerHTML container
+ pspecialReplacement = "$1$2$3$5$1$4$2$5$6";
+
+$.htmlPrefilter = function( html ) {
+ return ( html + "" ).replace( rspecialHtml, pspecialReplacement );
+};
+
+
+
+
From af5264bdfd64581ba5f2a05e906d6178ce5977d5 Mon Sep 17 00:00:00 2001
From: Matthew Flaschen
Date: Fri, 15 Jan 2016 14:23:27 -0800
Subject: [PATCH 372/699] jQuery.when: Returns a resolved promise for no
arguments
Closes gh-868
---
entries/jQuery.when.xml | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/entries/jQuery.when.xml b/entries/jQuery.when.xml
index bcb12dc1..09c8393e 100644
--- a/entries/jQuery.when.xml
+++ b/entries/jQuery.when.xml
@@ -4,11 +4,12 @@
1.5
- One or more Deferred objects, or plain JavaScript objects.
+ Zero or more Deferred objects, or plain JavaScript objects.
- Provides a way to execute callback functions based on one or more objects, usually Deferred objects that represent asynchronous events.
+ Provides a way to execute callback functions based on zero or more 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:
$.when( $.ajax( "test.aspx" ) ).then(function( data, textStatus, jqXHR ) {
From 4ee55d3af232574735a8f2433497e784c5fb3a8a Mon Sep 17 00:00:00 2001
From: Aurelio De Rosa
Date: Sat, 16 Jan 2016 17:01:08 +0000
Subject: [PATCH 373/699] jQuery.css: Clarified that currentStyle and
runtimeStyle belong to IE9-
Fixes gh-867
Closes gh-869
---
entries/css.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/entries/css.xml b/entries/css.xml
index 8fe89b20..0658d754 100644
--- a/entries/css.xml
+++ b/entries/css.xml
@@ -17,7 +17,7 @@
Get the computed style properties for the first element in the set of matched elements.
-
The .css() method is a convenient way to get a computed style property from the first matched element, especially in light of the different ways browsers access most of those properties (the getComputedStyle() method in standards-based browsers versus the currentStyle and runtimeStyle properties in Internet Explorer) and the different terms browsers use for certain properties. For example, Internet Explorer's DOM implementation refers to the float property as styleFloat, while W3C standards-compliant browsers refer to it as cssFloat. For consistency, you can simply use "float", and jQuery will translate it to the correct value for each browser.
+
The .css() method is a convenient way to get a computed style property from the first matched element, especially in light of the different ways browsers access most of those properties (the getComputedStyle() method in standards-based browsers versus the currentStyle and runtimeStyle properties in Internet Explorer prior to version 9) and the different terms browsers use for certain properties. For example, Internet Explorer's DOM implementation refers to the float property as styleFloat, while W3C standards-compliant browsers refer to it as cssFloat. For consistency, you can simply use "float", and jQuery will translate it to the correct value for each browser.
Also, jQuery can equally interpret the CSS and DOM formatting of multiple-word properties. For example, jQuery understands and returns the correct value for both .css( "background-color" ) and .css( "backgroundColor" ). This means mixed case has a special meaning, .css( "WiDtH" ) won't do the same as .css( "width" ), for example.
Note that the computed style of an element may not be the same as the value specified for that element in a style sheet. For example, computed styles of dimensions are almost always pixels, but they can be specified as em, ex, px or % in a style sheet. Different browsers may return CSS color values that are logically but not textually equal, e.g., #FFF, #ffffff, and rgb(255,255,255).
Retrieval of shorthand CSS properties (e.g., margin, background, border), although functional with some browsers, is not guaranteed. For example, if you want to retrieve the rendered border-width, use: $( elem ).css( "borderTopWidth" ), $( elem ).css( "borderBottomWidth" ), and so on.
From 1fd8912c31a18307627e25d9bd55e87e2844f934 Mon Sep 17 00:00:00 2001
From: Vihan Bhargava
Date: Sat, 16 Jan 2016 08:23:38 -0800
Subject: [PATCH 374/699] Types: Clarified where to use parenthesis in numbers
to strings convertion
Fixes gh-870
---
pages/Types.html | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pages/Types.html b/pages/Types.html
index 4890df38..4dc65e34 100644
--- a/pages/Types.html
+++ b/pages/Types.html
@@ -205,7 +205,7 @@
Parsing Numbers
parseFloat( "10.10" ) = 10.1
Numbers to Strings
-
When appending numbers to string, the result is always a string. The operator is the same, so be careful: If you want to add numbers and then append them to a string, put parentheses around them:
+
When appending numbers to string, the result is always a string. The operator is the same, so be careful: If you want to add numbers and then append them to a string, put parentheses around the numbers:
In JavaScript, the variable "this" always refers to the current context. By default, "this" refers to the window object. Within a function this context can change, depending on how the function is called.
From fc260f6ecda27e5ded15114ea75023d1dae750b2 Mon Sep 17 00:00:00 2001
From: Richard Gibson
Date: Mon, 11 Jan 2016 23:50:26 -0500
Subject: [PATCH 376/699] jQuery.isNumber: Clarify purpose and behavior
Fixes gh-862
Closes gh-864
Ref jquery/jquery/issues/2781
---
entries/jQuery.isNumeric.xml | 39 ++++++++++++++++++++----------------
1 file changed, 22 insertions(+), 17 deletions(-)
diff --git a/entries/jQuery.isNumeric.xml b/entries/jQuery.isNumeric.xml
index c6ec81e8..7a4e7f6c 100644
--- a/entries/jQuery.isNumeric.xml
+++ b/entries/jQuery.isNumeric.xml
@@ -1,7 +1,7 @@
jQuery.isNumeric()
- Determines whether its argument is a number.
+ Determines whether its argument represents a JavaScript number.1.7
@@ -9,26 +9,31 @@
-
The $.isNumeric() method checks whether its argument represents a numeric value. If so, it returns true. Otherwise it returns false. The argument can be of any type.
+
The $.isNumeric() method checks whether a value is a finite number, or would be cast to one by Number. If so, it returns true. Otherwise it returns false. The argument can be of any type.
Sample return values of $.isNumeric with various inputs.
From 6eece50ee318333de81e834475d5cd48f784799b Mon Sep 17 00:00:00 2001
From: David Bazile
Date: Wed, 23 Sep 2015 12:46:31 -0400
Subject: [PATCH 377/699] jQuery.ajax: Added example for the accepts property
Closes gh-811
---
entries/jQuery.ajax.xml | 22 +++++++++++++++++++++-
1 file changed, 21 insertions(+), 1 deletion(-)
diff --git a/entries/jQuery.ajax.xml b/entries/jQuery.ajax.xml
index 81e3e42c..65f5b544 100644
--- a/entries/jQuery.ajax.xml
+++ b/entries/jQuery.ajax.xml
@@ -16,7 +16,27 @@
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().
- The content type sent in the request header that tells the server what kind of response it will accept in return.
+ 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({
+ accepts: {
+ mycustomtype: 'application/x-some-custom-type'
+ },
+
+ // Instructions for how to deserialize a `mycustomtype`
+ converters: {
+ 'text mycustomtype': function(result) {
+ // Do Stuff
+ return newresult;
+ }
+ },
+
+ // Expect a `mycustomtype` back from server
+ dataType: 'mycustomtype'
+});
+
+ Note: You will need to specify a complementary entry for this type in converters for this to work properly.
+ By default, all requests are sent asynchronously (i.e. this is set to true by default). If you need synchronous requests, set this option to false. Cross-domain requests and dataType: "jsonp" requests do not support synchronous operation. Note that synchronous requests may temporarily lock the browser, disabling any actions while the request is active. As of jQuery 1.8, the use of async: false with jqXHR ($.Deferred) is deprecated; you must use the success/error/complete callback options instead of the corresponding methods of the jqXHR object such as jqXHR.done() or the deprecated jqXHR.success().
From 674b7514dd46be08c75f8e38d60a90a724729159 Mon Sep 17 00:00:00 2001
From: Callum Kerr
Date: Mon, 18 Jan 2016 12:03:05 -0700
Subject: [PATCH 378/699] jQuery.offset: Add a link to .position()
Closes gh-875
---
entries/offset.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/entries/offset.xml b/entries/offset.xml
index 9b1a0093..e626ac5a 100644
--- a/entries/offset.xml
+++ b/entries/offset.xml
@@ -8,7 +8,7 @@
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 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.
From 5b90d81484b50366ca27510ba032117b606060b1 Mon Sep 17 00:00:00 2001
From: Aurelio De Rosa
Date: Thu, 11 Feb 2016 00:20:54 +0000
Subject: [PATCH 379/699] Noted support of SVG documents for class methods
Fixes gh-885
Closes gh-886
---
entries/hasClass.xml | 1 +
entries/toggleClass.xml | 2 ++
2 files changed, 3 insertions(+)
diff --git a/entries/hasClass.xml b/entries/hasClass.xml
index 37b52f79..ddf5d893 100644
--- a/entries/hasClass.xml
+++ b/entries/hasClass.xml
@@ -25,6 +25,7 @@ $( "#mydiv" ).hasClass( "bar" )
$( "#mydiv" ).hasClass( "quux" )
+
As of jQuery 1.12/2.2, this method supports XML documents, including SVG.
Looks for the paragraph that contains 'selected' as a class.
diff --git a/entries/toggleClass.xml b/entries/toggleClass.xml
index 1d034d86..f14cb8ed 100644
--- a/entries/toggleClass.xml
+++ b/entries/toggleClass.xml
@@ -37,6 +37,8 @@
Add or remove one or more classes from each element in the set of matched elements, depending on either the class's presence or the value of the state argument.
+
Before jQuery version 1.12/2.2, the .toggleClass() method manipulated the classNameproperty of the selected elements, not the classattribute. Once the property was changed, it was the browser that updated the attribute accordingly. An implication of this behavior was that this method only worked for documents with HTML DOM semantics (e.g., not pure XML documents).
+
As of jQuery 1.12/2.2, this behavior is changed to improve the support for XML documents, including SVG. Starting from this version, the classattribute is used instead. So, .toggleClass() can be used on XML or SVG documents.
This method takes one or more class names as its parameter. In the first version, if an element in the matched set of elements already has the class, then it is removed; if an element does not have the class, then it is added. For example, we can apply .toggleClass() to a simple <div>:
<div class="tumble">Some text.</div>
From b985c8eb6a33980366f6ddc73b8205e74229d372 Mon Sep 17 00:00:00 2001
From: Aurelio De Rosa
Date: Thu, 11 Feb 2016 00:24:19 +0000
Subject: [PATCH 380/699] stop: Specified default values
Closes gh-887
---
entries/stop.xml | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/entries/stop.xml b/entries/stop.xml
index ce38bd01..b66c0bcc 100644
--- a/entries/stop.xml
+++ b/entries/stop.xml
@@ -4,22 +4,22 @@
Stop the currently-running animation on the matched elements.1.2
-
+ A Boolean indicating whether to remove queued animation as well. Defaults to false.
-
+ A Boolean indicating whether to complete the current animation immediately. Defaults to false.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.
-
+ A Boolean indicating whether to complete the current animation immediately. Defaults to false.
From fb8d4da0b4002833ec2363a812e90ac019b07b05 Mon Sep 17 00:00:00 2001
From: Ian Kemp
Date: Wed, 10 Feb 2016 12:47:41 +0200
Subject: [PATCH 381/699] Specified defaults for outerWidth and outerHeight
Fixes gh-882
Closes gh-883
---
entries/outerHeight.xml | 2 +-
entries/outerWidth.xml | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/entries/outerHeight.xml b/entries/outerHeight.xml
index 95df451f..ab497404 100644
--- a/entries/outerHeight.xml
+++ b/entries/outerHeight.xml
@@ -5,7 +5,7 @@
.outerHeight()1.2.6
-
+ A Boolean indicating whether to include the element's margin in the calculation.
diff --git a/entries/outerWidth.xml b/entries/outerWidth.xml
index 24861c8e..64687fb9 100644
--- a/entries/outerWidth.xml
+++ b/entries/outerWidth.xml
@@ -5,7 +5,7 @@
.outerWidth()1.2.6
-
+ A Boolean indicating whether to include the element's margin in the calculation.
From 3a5b4cb769b43d379f1900cd8b089d855e723dee Mon Sep 17 00:00:00 2001
From: Aurelio De Rosa
Date: Mon, 18 Jan 2016 00:33:20 +0000
Subject: [PATCH 382/699] jQuery.closest: Removed reference to deprecated
context property
Fixes gh-857
Closes gh-874
---
entries/closest.xml | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/entries/closest.xml b/entries/closest.xml
index 5f1bb2b4..14c10a80 100644
--- a/entries/closest.xml
+++ b/entries/closest.xml
@@ -14,7 +14,7 @@
A string containing a selector expression to match elements against.
- A DOM element within which a matching element may be found. If no context is passed in then the context of the jQuery set will be used instead.
+ A DOM element within which a matching element may be found.
@@ -166,7 +166,7 @@ $( document ).on( "click", function( event ) {
An array or string containing a selector expression to match elements against (can also be a jQuery object).
- A DOM element within which a matching element may be found. If no context is passed in then the context of the jQuery set will be used instead.
+ A DOM element within which a matching element may be found.Get an array of all the elements and selectors matched against the current element up through the DOM tree.
From 5f397052be4613689274b6a2db185225443872ef Mon Sep 17 00:00:00 2001
From: Aurelio De Rosa
Date: Sat, 16 Jan 2016 17:39:22 +0000
Subject: [PATCH 383/699] jQuery.css: Specified that important declarations are
ignored
Fixes gh-866
Closes gh-872
---
entries/css.xml | 1 +
1 file changed, 1 insertion(+)
diff --git a/entries/css.xml b/entries/css.xml
index 0658d754..34fc7237 100644
--- a/entries/css.xml
+++ b/entries/css.xml
@@ -146,6 +146,7 @@ $( "div" ).click(function() {
Also, jQuery can equally interpret the CSS and DOM formatting of multiple-word properties. For example, jQuery understands and returns the correct value for both .css({ "background-color": "#ffe", "border-left": "5px solid #ccc" }) and .css({backgroundColor: "#ffe", borderLeft: "5px solid #ccc" }). Notice that with the DOM notation, quotation marks around the property names are optional, but with CSS notation they're required due to the hyphen in the name.
When a number is passed as the value, jQuery will convert it to a string and add px to the end of that string. If the property requires units other than px, convert the value to a string and add the appropriate units before calling the method.
When using .css() as a setter, jQuery modifies the element's style property. For example, $( "#mydiv" ).css( "color", "green" ) is equivalent to document.getElementById( "mydiv" ).style.color = "green". Setting the value of a style property to an empty string — e.g. $( "#mydiv" ).css( "color", "" ) — removes that property from an element if it has already been directly applied, whether in the HTML style attribute, through jQuery's .css() method, or through direct DOM manipulation of the style property. As a consequence, the element's style for that property will be restored to whatever value was applied. So, this method can be used to cancel any style modification you have previously performed. It does not, however, remove a style that has been applied with a CSS rule in a stylesheet or <style> element. Warning: one notable exception is that, for IE 8 and below, removing a shorthand property such as border or background will remove that style entirely from the element, regardless of what is set in a stylesheet or <style> element.
+
Note:.css() ignores !important declarations. So, the statement $( "p" ).css( "color", "red !important" ) does not turn the color of all paragraphs in the page to red. It's strongly advised to use classes instead; otherwise use a jQuery plugin.
As of jQuery 1.8, the .css() setter will automatically take care of prefixing the property name. For example, take .css( "user-select", "none" ) in Chrome/Safari will set it as -webkit-user-select, Firefox will use -moz-user-select, and IE10 will use -ms-user-select.
As of jQuery 1.6, .css() accepts relative values similar to .animate(). Relative values are a string starting with += or -= to increment or decrement the current value. For example, if an element's padding-left was 10px, .css( "padding-left", "+=15" ) would result in a total padding-left of 25px.
As of jQuery 1.4, .css() allows us to pass a function as the property value:
From 6142f8693cba08be3372d71f9b75cf80190cbb24 Mon Sep 17 00:00:00 2001
From: Aurelio De Rosa
Date: Mon, 18 Jan 2016 00:11:06 +0000
Subject: [PATCH 384/699] jQuery.prev: Clarified its behavior
Fixes gh-861
Closes gh-873
---
entries/prev.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/entries/prev.xml b/entries/prev.xml
index bfa4fa2f..7ee31594 100644
--- a/entries/prev.xml
+++ b/entries/prev.xml
@@ -7,7 +7,7 @@
A string containing a selector expression to match elements against.
- Get the immediately preceding sibling of each element in the set of matched elements, optionally filtered by a selector.
+ Get the immediately preceding sibling of each element in the set of matched elements. If a selector is provided, it retrieves the previous sibling only if it matches that selector.
Given a jQuery object that represents a set of DOM elements, the .prev() method searches for the predecessor of each of these elements in the DOM tree and constructs a new jQuery object from the matching elements.
The method optionally accepts a selector expression of the same type that can be passed to the $() function. If the selector is supplied, the preceding element will be filtered by testing whether it match the selector.
From a6eecc290676b5301c58e327ce52060555767f4b Mon Sep 17 00:00:00 2001
From: Aurelio De Rosa
Date: Sun, 14 Feb 2016 22:03:36 +0000
Subject: [PATCH 385/699] jQuery.hasData: Clarified when it returns false
Fixes gh-889
Closes gh-891
---
entries/jQuery.hasData.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/entries/jQuery.hasData.xml b/entries/jQuery.hasData.xml
index af081d41..ece74c75 100644
--- a/entries/jQuery.hasData.xml
+++ b/entries/jQuery.hasData.xml
@@ -9,7 +9,7 @@
Determine whether an element has any jQuery data associated with it.
-
The jQuery.hasData() method provides a way to determine if an element currently has any values that were set using jQuery.data(). If no data is associated with an element (there is no data object at all or the data object is empty), the method returns false; otherwise it returns true.
+
The jQuery.hasData() method provides a way to determine if an element currently has any values that were set using jQuery.data(). If there is no data object associated with an element, the method returns false; otherwise it returns true.
The primary advantage of jQuery.hasData(element) is that it does not create and associate a data object with the element if none currently exists. In contrast, jQuery.data(element) always returns a data object to the caller, creating one if no data object previously existed.
Note that jQuery's event system uses the jQuery data API to store event handlers. Therefore, binding an event to an element using .on(), .bind(), .live(), .delegate(), or one of the shorthand event methods also associates a data object with that element.
From 5e6a5a00cbd4ea9fe905a8fb90619b7741d0f808 Mon Sep 17 00:00:00 2001
From: Vitaly Zdanevich
Date: Fri, 5 Feb 2016 19:34:55 +0300
Subject: [PATCH 386/699] jQuery.on: Added example with multiple events
Closes gh-888
---
entries/on.xml | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/entries/on.xml b/entries/on.xml
index 34d14f4e..18a17cae 100644
--- a/entries/on.xml
+++ b/entries/on.xml
@@ -265,11 +265,19 @@ $( "body" ).on( "click", "p", function() {
]]>
- Cancel a link's default action using the .preventDefault() method.
+ Cancel a link's default action using the .preventDefault() method:
+
+
+ Attach multiple events—one on mouseenter and one on mouseleave to the same element:
+
From a465962f7b40c719c763d5f770e8eb36b76600df Mon Sep 17 00:00:00 2001
From: Aurelio De Rosa
Date: Tue, 16 Feb 2016 21:11:09 +0000
Subject: [PATCH 387/699] Clarified when the keydown event is fired
Fixes gh-876
Closes gh-892
---
entries/keydown.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/entries/keydown.xml b/entries/keydown.xml
index 50f83b57..f21ae4e0 100644
--- a/entries/keydown.xml
+++ b/entries/keydown.xml
@@ -24,7 +24,7 @@
Bind an event handler to the "keydown" JavaScript event, or trigger that event on an element.
This method is a shortcut for .on( "keydown", handler ) in the first and second variations, and .trigger( "keydown" ) in the third.
-
The keydown event is sent to an element when the user first presses a key on the keyboard. It can be attached to any element, but the event is only sent to the element that has the focus. Focusable elements can vary between browsers, but form elements can always get focus so are reasonable candidates for this event type.
+
The keydown event is sent to an element when the user presses a key on the keyboard. If the key is kept pressed, the event is sent every time the operating system repeats the key. It can be attached to any element, but the event is only sent to the element that has the focus. Focusable elements can vary between browsers, but form elements can always get focus so are reasonable candidates for this event type.
For example, consider the HTML:
<form>
From 5a9497eb0b6a99cdd579c5d68bffd1551ac90ea7 Mon Sep 17 00:00:00 2001
From: Aurelio De Rosa
Date: Wed, 17 Feb 2016 23:28:02 +0000
Subject: [PATCH 388/699] 1.12.0
---
package.json | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/package.json b/package.json
index 25fab7fc..5fb4ca99 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.11.117",
+ "version": "1.12.0",
"homepage": "https://github.com/jquery/api.jquery.com",
"author": {
"name": "jQuery Foundation and other contributors"
From 01824acfe979e7507952086b947015bf42840143 Mon Sep 17 00:00:00 2001
From: Jeromy French
Date: Tue, 12 May 2015 17:47:07 -0400
Subject: [PATCH 389/699] checked selector: Added link :selected
Fixes gh-558
Closes gh-740
---
entries/checked-selector.xml | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/entries/checked-selector.xml b/entries/checked-selector.xml
index ebf96c2b..5d49ebcd 100644
--- a/entries/checked-selector.xml
+++ b/entries/checked-selector.xml
@@ -7,7 +7,8 @@
Matches all elements that are checked or selected.
-
The :checked selector works for checkboxes, radio buttons, and select elements. For select elements only, use the :selected selector.
+
The :checked selector works for checkboxes, radio buttons, and options of select elements.
+
To retrieve only the selected options of select elements, use the :selected selector.
Determine how many input elements are checked.
From 28a7fe628643e15470bc18d1657d187c865a581b Mon Sep 17 00:00:00 2001
From: Aurelio De Rosa
Date: Wed, 24 Feb 2016 23:47:33 +0000
Subject: [PATCH 390/699] First selector: Clarified behavior
Fixes gh-894
Closes gh-895
---
entries/first-selector.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/entries/first-selector.xml b/entries/first-selector.xml
index a0371809..0676d85f 100644
--- a/entries/first-selector.xml
+++ b/entries/first-selector.xml
@@ -5,7 +5,7 @@
1.0
- Selects the first matched element.
+ Selects the first matched DOM element.
The :first pseudo-class is equivalent to :eq( 0 ). It could also be written as :lt( 1 ). While this matches only a single element, :first-child can match more than one: One for each parent.
From f606cecd6ad1a6ca524787b80c19af72700f5330 Mon Sep 17 00:00:00 2001
From: Aurelio De Rosa
Date: Thu, 25 Feb 2016 23:33:18 +0000
Subject: [PATCH 391/699] Added note about support for SVG documents
Fixes gh-884
Closes gh-896
---
entries/append.xml | 3 ++-
entries/appendTo.xml | 1 +
entries/attr.xml | 1 +
entries/filter.xml | 1 +
entries/find.xml | 1 +
entries/insertAfter.xml | 1 +
entries/insertBefore.xml | 1 +
entries/prepend.xml | 1 +
entries/prependTo.xml | 1 +
entries/removeAttr.xml | 1 +
notes.xsl | 3 +++
11 files changed, 14 insertions(+), 1 deletion(-)
diff --git a/entries/append.xml b/entries/append.xml
index c1de1420..07acacf1 100644
--- a/entries/append.xml
+++ b/entries/append.xml
@@ -33,7 +33,7 @@
Insert content, specified by the parameter, to the end of each element in the set of matched elements.
-
The .append() method inserts the specified content as the last child of each element in the jQuery collection (To insert it as the first child, use .prepend()).
+
The .append() method inserts the specified content as the last child of each element in the jQuery collection (To insert it as the first child, use .prepend()).
The .append() and .appendTo() methods perform the same task. The major difference is in the syntax-specifically, in the placement of the content and target. With .append(), the selector expression preceding the method is the container into which the content is inserted. With .appendTo(), on the other hand, the content precedes the method, either as a selector expression or as markup created on the fly, and it is inserted into the target container.
Since .append() can accept any number of additional arguments, the same result can be achieved by passing in the three <div>s as three separate arguments, like so: $('body').append( $newdiv1, newdiv2, existingdiv1 ). The type and number of arguments will largely depend on how you collect the elements in your code.
+ Appends some HTML to all paragraphs.Before jQuery 1.9, the append-to-single-element case did not create a new set, but instead returned the original set which made it difficult to use the .end() method reliably when being used with an unknown number of elements.
+ Append all spans to the element with the ID "foo" (Check append() documentation for more examples)Note: Attribute values are strings with the exception of a few attributes such as value and tabindex.
As of jQuery 1.6, the .attr() method returns undefined for attributes that have not been set. To retrieve and change DOM properties such as the checked, selected, or disabled state of form elements, use the .prop() method.
+
Attributes vs. Properties
The difference between attributes and properties can be important in specific situations. Before jQuery 1.6, the .attr() method sometimes took property values into account when retrieving some attributes, which could cause inconsistent behavior. As of jQuery 1.6, the .prop() method provides a way to explicitly retrieve property values, while .attr() retrieves attributes.
This alteration to the code will cause the third and sixth list items to be highlighted, as it uses the modulus operator (%) to select every item with an index value that, when divided by 3, has a remainder of 2.
+
Change the color of all divs; then add a border to those with a "middle" class.
diff --git a/entries/find.xml b/entries/find.xml
index b6a82654..0a080a05 100644
--- a/entries/find.xml
+++ b/entries/find.xml
@@ -63,6 +63,7 @@ var item1 = $( "li.item-1" )[ 0 ];
$( "li.item-ii" ).find( item1 ).css( "background-color", "red" );
The result of this call would be a red background on item 1.
+ Starts with all paragraphs and searches for descendant span elements, same as $( "p span" )
diff --git a/entries/insertAfter.xml b/entries/insertAfter.xml
index 7e3435f8..9065d305 100644
--- a/entries/insertAfter.xml
+++ b/entries/insertAfter.xml
@@ -53,6 +53,7 @@ $( "h2" ).insertAfter( $( ".container" ) );
Before jQuery 1.9, the append-to-single-element case did not create a new set, but instead returned the original set which made it difficult to use the .end() method reliably when being used with an unknown number of elements.
+ Insert all paragraphs after an element with id of "foo". Same as $( "#foo" ).after( "p" )Before jQuery 1.9, the append-to-single-element case did not create a new set, but instead returned the original set which made it difficult to use the .end() method reliably when being used with an unknown number of elements.
+ Insert all paragraphs before an element with id of "foo". Same as $( "#foo" ).before( "p" )Since .prepend() can accept any number of additional arguments, the same result can be achieved by passing in the three <div>s as three separate arguments, like so: $( "body" ).prepend( $newdiv1, newdiv2, existingdiv1 ). The type and number of arguments will largely depend on how you collect the elements in your code.
+ Prepends some HTML to all paragraphs.If there is more than one target element, however, cloned copies of the inserted element will be created for each target except the last.
+ Prepend all spans to the element with the ID "foo" (Check .prepend() documentation for more examples)
+ Clicking the button changes the title of the input next to it. Move the mouse pointer over the text input to see the effect of adding and removing the title attribute.
diff --git a/notes.xsl b/notes.xsl
index eb5a9c61..50f94fc0 100644
--- a/notes.xsl
+++ b/notes.xsl
@@ -70,6 +70,9 @@
As of jQuery 1.9, all the handlers for the jQuery global Ajax events, including those added with the method, must be attached to document.
+
+ jQuery doesn't officially support SVG. Using jQuery methods on SVG documents, unless explicitly documented for that method, might cause unexpected behaviors. Examples of methods that support SVG as of jQuery 3.0 are addClass and removeClass.
+
From 6cbf6b787db3631a4e797bd0c5cfb82046db2f82 Mon Sep 17 00:00:00 2001
From: Aurelio De Rosa
Date: Fri, 26 Feb 2016 22:03:41 +0000
Subject: [PATCH 392/699] 1.12.1
---
package.json | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/package.json b/package.json
index 5fb4ca99..d8865dc2 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.0",
+ "version": "1.12.1",
"homepage": "https://github.com/jquery/api.jquery.com",
"author": {
"name": "jQuery Foundation and other contributors"
From 075661471fc1b49c52cd27afe5d0af04c0177f21 Mon Sep 17 00:00:00 2001
From: Richard Gibson
Date: Thu, 3 Mar 2016 15:23:41 -0500
Subject: [PATCH 393/699] val: Document empty-context behavior
Fixes gh-893
Ref https://github.com/jquery/jquery/issues/2319
Closes gh-897
---
entries/val.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/entries/val.xml b/entries/val.xml
index 52f2023f..2c78771f 100644
--- a/entries/val.xml
+++ b/entries/val.xml
@@ -11,7 +11,7 @@
Get the current value of the first element in the set of matched elements.
-
The .val() method is primarily used to get the values of form elements such as input, select and textarea. In the case of select elements, it returns null when no option is selected and an array containing the value of each selected option when there is at least one and it is possible to select more because the multiple attribute is present.
+
The .val() method is primarily used to get the values of form elements such as input, select and textarea. When the first element in the collection is a select-multiple (i.e., a select element with the multiple attribute set), it returns an array containing the value of each selected option, or null if no options are selected. When called on an empty collection, it returns undefined.
For selects and checkboxes, you can also use the :selected and :checked selectors to get at values, for example:
// Get the value from a dropdown select
From e98feb7a5c4b88391a5667045f197e2ce450e7f4 Mon Sep 17 00:00:00 2001
From: Aurelio De Rosa
Date: Sat, 12 Mar 2016 11:26:11 +0000
Subject: [PATCH 394/699] jQuery.ajax: Added note for jsonp and untrusted
sources
Ref gh-756
Closes gh-900
---
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 65f5b544..d1d0e4d8 100644
--- a/entries/jQuery.ajax.xml
+++ b/entries/jQuery.ajax.xml
@@ -124,7 +124,7 @@ $.ajax({
Allow the current environment to be recognized as "local," (e.g. the filesystem), even if jQuery does not recognize it as such by default. The following protocols are currently recognized as local: file, *-extension, and widget. If the isLocal setting needs modification, it is recommended to do so once in the $.ajaxSetup() method.
- Override the callback function name in a JSONP request. This value will be used instead of 'callback' in the 'callback=?' part of the query string in the url. So {jsonp:'onJSONPLoad'} would result in 'onJSONPLoad=?' passed to the server. As of jQuery 1.5, setting the jsonp option to false prevents jQuery from adding the "?callback" string to the URL or attempting to use "=?" for transformation. In this case, you should also explicitly set the jsonpCallback setting. For example, { jsonp: false, jsonpCallback: "callbackName" }
+ Override the callback function name in a JSONP request. This value will be used instead of 'callback' in the 'callback=?' part of the query string in the url. So {jsonp:'onJSONPLoad'} would result in 'onJSONPLoad=?' passed to the server. As of jQuery 1.5, setting the jsonp option to false prevents jQuery from adding the "?callback" string to the URL or attempting to use "=?" for transformation. In this case, you should also explicitly set the jsonpCallback setting. For example, { jsonp: false, jsonpCallback: "callbackName" }. If you don't trust the target of your Ajax requests, consider setting the jsonp property to false for security reasons.
From 75d59a317552b4978bbd27ee50dad8bb27a5cb15 Mon Sep 17 00:00:00 2001
From: Aurelio De Rosa
Date: Sat, 12 Mar 2016 11:29:09 +0000
Subject: [PATCH 395/699] jQuery.ajax: Specified that jsonp accepts a Boolean
---
entries/jQuery.ajax.xml | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/entries/jQuery.ajax.xml b/entries/jQuery.ajax.xml
index d1d0e4d8..33ce8b72 100644
--- a/entries/jQuery.ajax.xml
+++ b/entries/jQuery.ajax.xml
@@ -123,7 +123,9 @@ $.ajax({
Allow the current environment to be recognized as "local," (e.g. the filesystem), even if jQuery does not recognize it as such by default. The following protocols are currently recognized as local: file, *-extension, and widget. If the isLocal setting needs modification, it is recommended to do so once in the $.ajaxSetup() method.
-
+
+
+ Override the callback function name in a JSONP request. This value will be used instead of 'callback' in the 'callback=?' part of the query string in the url. So {jsonp:'onJSONPLoad'} would result in 'onJSONPLoad=?' passed to the server. As of jQuery 1.5, setting the jsonp option to false prevents jQuery from adding the "?callback" string to the URL or attempting to use "=?" for transformation. In this case, you should also explicitly set the jsonpCallback setting. For example, { jsonp: false, jsonpCallback: "callbackName" }. If you don't trust the target of your Ajax requests, consider setting the jsonp property to false for security reasons.
From 67996d7aa733c1b34cb699198f0cce3abe05eaf1 Mon Sep 17 00:00:00 2001
From: Aurelio De Rosa
Date: Sat, 12 Mar 2016 14:34:11 +0000
Subject: [PATCH 396/699] scrollTop: Updated the return value to Number
Fixes gh-608
Closes gh-901
---
entries/scrollTop.xml | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/entries/scrollTop.xml b/entries/scrollTop.xml
index 027d3db0..9f0ec14e 100644
--- a/entries/scrollTop.xml
+++ b/entries/scrollTop.xml
@@ -1,6 +1,6 @@
-
+ .scrollTop()1.2.6
@@ -35,7 +35,7 @@ $( "p:last" ).text( "scrollTop:" + p.scrollTop() );
1.2.6
- An integer indicating the new position to set the scroll bar to.
+ A number indicating the new position to set the scroll bar to.Set the current vertical position of the scroll bar for each of the set of matched elements.
From 82c278e15cf114a90a50d9801b074311b0e11150 Mon Sep 17 00:00:00 2001
From: Kris Borchers
Date: Wed, 23 Mar 2016 14:28:08 -0400
Subject: [PATCH 397/699] jQuery.speed: Fix incorrect custom-effects slug
Closes gh-902
---
entries/jQuery.speed.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/entries/jQuery.speed.xml b/entries/jQuery.speed.xml
index cb5ea916..75cd1e68 100644
--- a/entries/jQuery.speed.xml
+++ b/entries/jQuery.speed.xml
@@ -40,7 +40,7 @@
The $.speed() method provides a way to define properties, such as duration, easing, and queue, to use in a custom animation. By using it, you don't have to implement the logic that deals with default values and optional parameters.
This method is meant for plugin developers who are creating new animation methods. Letting $.speed() do all the parameter hockey and normalization for you, rather than duplicating the logic yourself, makes your work simpler. An example of use can be found in the animated form of .addClass() of jQuery UI.
This method is typically used to set the values of form fields.
val() allows you to pass an array of element values. This is useful when working on a jQuery object containing elements like <input type="checkbox">, <input type="radio">, and <option>s inside of a <select>. In this case, the inputs and the options having a value that matches one of the elements of the array will be checked or selected while those having a value that don't match one of the elements of the array will be unchecked or unselected, depending on the type. In case of <input type="radio">s that are part of a radio group and <select>s, any previously selected element will be deselected.
+
Setting values using this method (or using the native value property) does not cause the dispatch of the change event. For this reason, the relevant event handlers will not be executed. If you want to execute them, you should call .trigger( "change" ) after setting the value.
The .val() method allows us to set the value by passing in a function. As of jQuery 1.4, the function is passed two arguments, the current element's index and its current value:
$( "input:text.items" ).val(function( index, value ) {
From 8c1b6078749786878fe70f55927f6e9c251e13b3 Mon Sep 17 00:00:00 2001
From: Aaron Jorbin
Date: Wed, 13 Apr 2016 22:45:12 -0400
Subject: [PATCH 402/699] Link to W3C for unquoted single word
Unquoted single word has a specific definition in this case that is not
succinct. A link to the spec helps developers understand what is meant.
Fixes gh-910
Ref jquery/jquery#2824
Closes gh-911
---
entries/attribute-contains-prefix-selector.xml | 2 +-
entries/attribute-contains-selector.xml | 2 +-
entries/attribute-contains-word-selector.xml | 2 +-
entries/attribute-ends-with-selector.xml | 2 +-
entries/attribute-equals-selector.xml | 2 +-
entries/attribute-not-equal-selector.xml | 2 +-
entries/attribute-starts-with-selector.xml | 2 +-
7 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/entries/attribute-contains-prefix-selector.xml b/entries/attribute-contains-prefix-selector.xml
index 4b706bc6..81856a8c 100644
--- a/entries/attribute-contains-prefix-selector.xml
+++ b/entries/attribute-contains-prefix-selector.xml
@@ -8,7 +8,7 @@
An attribute name.
- An attribute value. Can be either an unquoted single word or a quoted string.
+ An attribute value. Can be either an unquoted single word or a quoted string.Selects elements that have the specified attribute with a value either equal to a given string or starting with that string followed by a hyphen (-).
diff --git a/entries/attribute-contains-selector.xml b/entries/attribute-contains-selector.xml
index 8cb21dfc..9974ab80 100644
--- a/entries/attribute-contains-selector.xml
+++ b/entries/attribute-contains-selector.xml
@@ -8,7 +8,7 @@
An attribute name.
- An attribute value. Can be either an unquoted single word or a quoted string.
+ An attribute value. Can be either an unquoted single word or a quoted string.Selects elements that have the specified attribute with a value containing a given substring.
diff --git a/entries/attribute-contains-word-selector.xml b/entries/attribute-contains-word-selector.xml
index 18df4cbc..08553983 100644
--- a/entries/attribute-contains-word-selector.xml
+++ b/entries/attribute-contains-word-selector.xml
@@ -8,7 +8,7 @@
An attribute name.
- An attribute value. Can be either an unquoted single word or a quoted string.
+ An attribute value. Can be either an unquoted single word or a quoted string.Selects elements that have the specified attribute with a value containing a given word, delimited by spaces.
diff --git a/entries/attribute-ends-with-selector.xml b/entries/attribute-ends-with-selector.xml
index 0febbde7..cb0f3344 100644
--- a/entries/attribute-ends-with-selector.xml
+++ b/entries/attribute-ends-with-selector.xml
@@ -8,7 +8,7 @@
An attribute name.
- An attribute value. Can be either an unquoted single word or a quoted string.
+ An attribute value. Can be either an unquoted single word or a quoted string.Selects elements that have the specified attribute with a value ending exactly with a given string. The comparison is case sensitive.
diff --git a/entries/attribute-equals-selector.xml b/entries/attribute-equals-selector.xml
index 555cf7c9..b29d733e 100644
--- a/entries/attribute-equals-selector.xml
+++ b/entries/attribute-equals-selector.xml
@@ -8,7 +8,7 @@
An attribute name.
- An attribute value. Can be either an unquoted single word or a quoted string.
+ An attribute value. Can be either an unquoted single word or a quoted string.Selects elements that have the specified attribute with a value exactly equal to a certain value.
diff --git a/entries/attribute-not-equal-selector.xml b/entries/attribute-not-equal-selector.xml
index fabb6a2e..6736dd70 100644
--- a/entries/attribute-not-equal-selector.xml
+++ b/entries/attribute-not-equal-selector.xml
@@ -8,7 +8,7 @@
An attribute name.
- An attribute value. Can be either an unquoted single word or a quoted string.
+ An attribute value. Can be either an unquoted single word or a quoted string.Select elements that either don't have the specified attribute, or do have the specified attribute but not with a certain value.
diff --git a/entries/attribute-starts-with-selector.xml b/entries/attribute-starts-with-selector.xml
index 3c2f6912..41485c85 100644
--- a/entries/attribute-starts-with-selector.xml
+++ b/entries/attribute-starts-with-selector.xml
@@ -8,7 +8,7 @@
An attribute name.
- An attribute value. Can be either an unquoted single word or a quoted string.
+ An attribute value. Can be either an unquoted single word or a quoted string.Selects elements that have the specified attribute with a value beginning exactly with a given string.
From e45384e612f2378f3a875e5b20a99bd62179c1c7 Mon Sep 17 00:00:00 2001
From: Aurelio De Rosa
Date: Tue, 19 Apr 2016 02:44:07 +0100
Subject: [PATCH 403/699] Types: Added Text
---
pages/Types.html | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/pages/Types.html b/pages/Types.html
index 3ab98753..6e75a12f 100644
--- a/pages/Types.html
+++ b/pages/Types.html
@@ -88,6 +88,7 @@
You could replace this.value with $(this).val() to access the value of the text input via jQuery, but in that case you wouldn't gain anything.
+
Text
+
Text is a node of the Document Object Model (DOM) that represents the textual content of an element or an attribute. Consider the following code:
+
+
<p id="target"><b>Hello</b> world</p>
+
+
If you retrieve the children of the paragraph of the example as follows:
+
+
var children = document.getElementById( "target" ).childNodes;
+
+you obtain two children. The first one is the element representing the b tag. The second child is a text node containing the string " world".
+
jQuery
A jQuery object contains a collection of Document Object Model (DOM) elements that have been created from an HTML string or selected from a document. Since jQuery methods often use CSS selectors to match elements from a document, the set of elements in a jQuery object is often called a set of "matched elements" or "selected elements".
From 9bf395aeb56299b05c84fda632865260d054ca8e Mon Sep 17 00:00:00 2001
From: Aurelio De Rosa
Date: Tue, 19 Apr 2016 02:44:12 +0100
Subject: [PATCH 404/699] append: Documented that it accepts text nodes
Fixes gh-879
Closes gh-914
---
entries/after.xml | 12 ++++++++----
entries/append.xml | 9 ++++++---
entries/before.xml | 12 ++++++++----
entries/prepend.xml | 9 ++++++---
4 files changed, 28 insertions(+), 14 deletions(-)
diff --git a/entries/after.xml b/entries/after.xml
index ee63cbf7..4d2c477c 100644
--- a/entries/after.xml
+++ b/entries/after.xml
@@ -4,16 +4,18 @@
1.0
- HTML string, DOM element, array of elements, or jQuery object to insert after each element in the set of matched elements.
+ HTML string, DOM element, text node, array of elements and text nodes, or jQuery object to insert after each element in the set of matched elements.
+
- One or more additional DOM elements, arrays of elements, HTML strings, or jQuery objects to insert after each element in the set of matched elements.
+ One or more additional DOM elements, text nodes, arrays of elements and text nodes, HTML strings, or jQuery objects to insert after each element in the set of matched elements.
+
@@ -21,11 +23,12 @@
1.4
- A function that returns an HTML string, DOM element(s), or jQuery object to insert after each element in the set of matched elements. Receives the index position of the element in the set as an argument. Within the function, this refers to the current element in the set.
+ A function that returns an HTML string, DOM element(s), text node(s), or jQuery object to insert after each element in the set of matched elements. Receives the index position of the element in the set as an argument. Within the function, this refers to the current element in the set.
+
@@ -33,12 +36,13 @@
1.10
- A function that returns an HTML string, DOM element(s), or jQuery object to insert after each element in the set of matched elements. Receives the index position of the element in the set and the old HTML value of the element as arguments. Within the function, this refers to the current element in the set.
+ A function that returns an HTML string, DOM element(s), text node(s), or jQuery object to insert after each element in the set of matched elements. Receives the index position of the element in the set and the old HTML value of the element as arguments. Within the function, this refers to the current element in the set.
+
diff --git a/entries/append.xml b/entries/append.xml
index 07acacf1..acdd1b11 100644
--- a/entries/append.xml
+++ b/entries/append.xml
@@ -4,16 +4,18 @@
1.0
- DOM element, array of elements, HTML string, or jQuery object to insert at the end of each element in the set of matched elements.
+ DOM element, text node, array of elements and text nodes, HTML string, or jQuery object to insert at the end of each element in the set of matched elements.
+
- One or more additional DOM elements, arrays of elements, HTML strings, or jQuery objects to insert at the end of each element in the set of matched elements.
+ One or more additional DOM elements, text nodes, arrays of elements and text nodes, HTML strings, or jQuery objects to insert at the end of each element in the set of matched elements.
+
@@ -21,12 +23,13 @@
1.4
- A function that returns an HTML string, DOM element(s), or jQuery object to insert at the end of each element in the set of matched elements. Receives the index position of the element in the set and the old HTML value of the element as arguments. Within the function, this refers to the current element in the set.
+ A function that returns an HTML string, DOM element(s), text node(s), or jQuery object to insert at the end of each element in the set of matched elements. Receives the index position of the element in the set and the old HTML value of the element as arguments. Within the function, this refers to the current element in the set.
+
diff --git a/entries/before.xml b/entries/before.xml
index 6a388ca4..ae958dc1 100644
--- a/entries/before.xml
+++ b/entries/before.xml
@@ -4,16 +4,18 @@
1.0
- HTML string, DOM element, array of elements, or jQuery object to insert before each element in the set of matched elements.
+ HTML string, DOM element, text node, array of elements and text nodes, or jQuery object to insert before each element in the set of matched elements.
+
- One or more additional DOM elements, arrays of elements, HTML strings, or jQuery objects to insert before each element in the set of matched elements.
+ One or more additional DOM elements, text nodes, arrays of elements and text nodes, HTML strings, or jQuery objects to insert before each element in the set of matched elements.
+
@@ -25,9 +27,10 @@
+
- A function that returns an HTML string, DOM element(s), or jQuery object to insert before each element in the set of matched elements. Receives the index position of the element in the set as an argument. Within the function, this refers to the current element in the set.
+ A function that returns an HTML string, DOM element(s), text node(s), or jQuery object to insert before each element in the set of matched elements. Receives the index position of the element in the set as an argument. Within the function, this refers to the current element in the set.
@@ -39,9 +42,10 @@
+
- A function that returns an HTML string, DOM element(s), or jQuery object to insert before each element in the set of matched elements. Receives the index position of the element in the set and the old HTML value of the element as arguments. Within the function, this refers to the current element in the set.
+ A function that returns an HTML string, DOM element(s), text node(s), or jQuery object to insert before each element in the set of matched elements. Receives the index position of the element in the set and the old HTML value of the element as arguments. Within the function, this refers to the current element in the set.
diff --git a/entries/prepend.xml b/entries/prepend.xml
index 4e12fcb8..912dd6fc 100644
--- a/entries/prepend.xml
+++ b/entries/prepend.xml
@@ -4,18 +4,20 @@
1.0
- DOM element, array of elements, HTML string, or jQuery object to insert at the beginning of each element in the set of matched elements.
+ DOM element, text node, array of elements and text nodes, HTML string, or jQuery object to insert at the beginning of each element in the set of matched elements.
+
+
- One or more additional DOM elements, arrays of elements, HTML strings, or jQuery objects to insert at the beginning of each element in the set of matched elements.
+ One or more additional DOM elements, text nodes, arrays of elements and text nodes, HTML strings, or jQuery objects to insert at the beginning of each element in the set of matched elements.
@@ -26,9 +28,10 @@
+
- A function that returns an HTML string, DOM element(s), or jQuery object to insert at the beginning of each element in the set of matched elements. Receives the index position of the element in the set and the old HTML value of the element as arguments. Within the function, this refers to the current element in the set.
+ A function that returns an HTML string, DOM element(s), text node(s), or jQuery object to insert at the beginning of each element in the set of matched elements. Receives the index position of the element in the set and the old HTML value of the element as arguments. Within the function, this refers to the current element in the set.Insert content, specified by the parameter, to the beginning of each element in the set of matched elements.
From 8b3b088c76c1e23d96bea3b54079f33e6f5a1afe Mon Sep 17 00:00:00 2001
From: Karl Swedberg
Date: Thu, 21 Apr 2016 08:12:39 -0400
Subject: [PATCH 405/699] Types page: Add missing opening
Text is a node of the Document Object Model (DOM) that represents the textual content of an element or an attribute. Consider the following code:
-
<p id="target"><b>Hello</b> world</p>
-
+
<p id="target"><b>Hello</b> world</p>
If you retrieve the children of the paragraph of the example as follows:
var children = document.getElementById( "target" ).childNodes;
-you obtain two children. The first one is the element representing the b tag. The second child is a text node containing the string " world".
+
you obtain two children. The first one is the element representing the b tag. The second child is a text node containing the string " world".
jQuery
A jQuery object contains a collection of Document Object Model (DOM) elements that have been created from an HTML string or selected from a document. Since jQuery methods often use CSS selectors to match elements from a document, the set of elements in a jQuery object is often called a set of "matched elements" or "selected elements".
From 0d78b3ae6411ece043df1c7ae57bc42a58ec4516 Mon Sep 17 00:00:00 2001
From: Connor Cartwright
Date: Thu, 5 May 2016 23:04:32 +0100
Subject: [PATCH 406/699] one: Clarified its behavior
Fixes gh-796
Closes gh-923
---
entries/one.xml | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/entries/one.xml b/entries/one.xml
index 1327dbf0..588f1d55 100644
--- a/entries/one.xml
+++ b/entries/one.xml
@@ -44,7 +44,7 @@
-
The .one() method is identical to .on(), except that the handler is unbound after its first invocation. For example:
+
The .one() method is identical to .on(), except that the handler for a given element and event type is unbound after its first invocation. For example:
$( "#foo" ).one( "click", function() {
alert( "This will be displayed only once." );
@@ -59,6 +59,12 @@ $( "#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.
In the example above the alert could be displayed twice due to the two event types (click and mouseover).
Tie a one-time click to each div.
From a16c3b4b139e41d3910de153b8daa3c5a31e2fe7 Mon Sep 17 00:00:00 2001
From: Connor Cartwright
Date: Thu, 5 May 2016 21:54:23 +0100
Subject: [PATCH 407/699] disabled: Described when an element is actually
disabled
Fixes gh-734
Closes gh-920
---
entries/disabled-selector.xml | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/entries/disabled-selector.xml b/entries/disabled-selector.xml
index f018318c..812c8f57 100644
--- a/entries/disabled-selector.xml
+++ b/entries/disabled-selector.xml
@@ -9,9 +9,9 @@
As with other pseudo-class selectors (those that begin with a ":"), it is recommended to precede it with a tag name or some other selector; otherwise, the universal selector ("*") is implied. In other words, the bare $(':disabled') is equivalent to $('*:disabled'), so $('input:disabled') or similar should be used instead.
-
Although their resulting selections are usually the same, the :disabled selector is subtly different from the [disabled] attribute selector; :disabled checks the boolean (true/false) value of the element's disabled property while [disabled] checks for the existence of the disabled attribute.
+
Although their resulting selections are usually the same, the :disabled selector is subtly different from the [disabled] attribute selector;:disabled matches elements that are actually disabled while [disabled] only checks for the existence of the disabled attribute.
-
The :disabled selector should only be used for selecting HTML elements that support the disabled attribute (<button>, <input>, <optgroup>, <option>, <select>, and <textarea>).
+
The :disabled selector should only be used for selecting HTML elements that support the disabled attribute (<button>, <input>, <optgroup>, <option>, <select>, <textarea>, <menuitem>, and <fieldset>).
From d24fc66ed6998a03ccda9a69b4db005a9676c6b0 Mon Sep 17 00:00:00 2001
From: Connor Cartwright
Date: Sun, 8 May 2016 20:27:36 +0100
Subject: [PATCH 408/699] Changed "unquoted single word" in "valid identifier"
Fixes gh-918
Closes gh-927
---
entries/attribute-contains-prefix-selector.xml | 2 +-
entries/attribute-contains-selector.xml | 2 +-
entries/attribute-contains-word-selector.xml | 2 +-
entries/attribute-ends-with-selector.xml | 2 +-
entries/attribute-equals-selector.xml | 2 +-
entries/attribute-not-equal-selector.xml | 2 +-
entries/attribute-starts-with-selector.xml | 2 +-
7 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/entries/attribute-contains-prefix-selector.xml b/entries/attribute-contains-prefix-selector.xml
index 81856a8c..3465e6c2 100644
--- a/entries/attribute-contains-prefix-selector.xml
+++ b/entries/attribute-contains-prefix-selector.xml
@@ -8,7 +8,7 @@
An attribute name.
- An attribute value. Can be either an unquoted single word or a quoted string.
+ An attribute value. Can be either a valid identifier or a quoted string.Selects elements that have the specified attribute with a value either equal to a given string or starting with that string followed by a hyphen (-).
diff --git a/entries/attribute-contains-selector.xml b/entries/attribute-contains-selector.xml
index 9974ab80..15e7778d 100644
--- a/entries/attribute-contains-selector.xml
+++ b/entries/attribute-contains-selector.xml
@@ -8,7 +8,7 @@
An attribute name.
- An attribute value. Can be either an unquoted single word or a quoted string.
+ An attribute value. Can be either a valid identifier or a quoted string.Selects elements that have the specified attribute with a value containing a given substring.
diff --git a/entries/attribute-contains-word-selector.xml b/entries/attribute-contains-word-selector.xml
index 08553983..8a71f37b 100644
--- a/entries/attribute-contains-word-selector.xml
+++ b/entries/attribute-contains-word-selector.xml
@@ -8,7 +8,7 @@
An attribute name.
- An attribute value. Can be either an unquoted single word or a quoted string.
+ An attribute value. Can be either a valid identifier or a quoted string.Selects elements that have the specified attribute with a value containing a given word, delimited by spaces.
diff --git a/entries/attribute-ends-with-selector.xml b/entries/attribute-ends-with-selector.xml
index cb0f3344..cbdfe808 100644
--- a/entries/attribute-ends-with-selector.xml
+++ b/entries/attribute-ends-with-selector.xml
@@ -8,7 +8,7 @@
An attribute name.
- An attribute value. Can be either an unquoted single word or a quoted string.
+ An attribute value. Can be either a valid identifier or a quoted string.Selects elements that have the specified attribute with a value ending exactly with a given string. The comparison is case sensitive.
diff --git a/entries/attribute-equals-selector.xml b/entries/attribute-equals-selector.xml
index b29d733e..faa6e513 100644
--- a/entries/attribute-equals-selector.xml
+++ b/entries/attribute-equals-selector.xml
@@ -8,7 +8,7 @@
An attribute name.
- An attribute value. Can be either an unquoted single word or a quoted string.
+ An attribute value. Can be either a valid identifier or a quoted string.Selects elements that have the specified attribute with a value exactly equal to a certain value.
diff --git a/entries/attribute-not-equal-selector.xml b/entries/attribute-not-equal-selector.xml
index 6736dd70..38531ffc 100644
--- a/entries/attribute-not-equal-selector.xml
+++ b/entries/attribute-not-equal-selector.xml
@@ -8,7 +8,7 @@
An attribute name.
- An attribute value. Can be either an unquoted single word or a quoted string.
+ An attribute value. Can be either a valid identifier or a quoted string.Select elements that either don't have the specified attribute, or do have the specified attribute but not with a certain value.
diff --git a/entries/attribute-starts-with-selector.xml b/entries/attribute-starts-with-selector.xml
index 41485c85..54067652 100644
--- a/entries/attribute-starts-with-selector.xml
+++ b/entries/attribute-starts-with-selector.xml
@@ -8,7 +8,7 @@
An attribute name.
- An attribute value. Can be either an unquoted single word or a quoted string.
+ An attribute value. Can be either a valid identifier or a quoted string.Selects elements that have the specified attribute with a value beginning exactly with a given string.
From e378db8ca39758fc5cfeea3913a0eea3731edd61 Mon Sep 17 00:00:00 2001
From: silverwind
Date: Tue, 10 May 2016 22:50:04 +0200
Subject: [PATCH 409/699] Event: Suggest event.originalEvent usage
jQuery.event.props has been removed, so it necessary to access
event.originalEvent for non-common properties.
Fixes #405
Closes #928
---
categories.xml | 13 ++++++-------
1 file changed, 6 insertions(+), 7 deletions(-)
diff --git a/categories.xml b/categories.xml
index d43d8929..c181a548 100644
--- a/categories.xml
+++ b/categories.xml
@@ -120,7 +120,7 @@ var e = jQuery.Event( "keydown", { keyCode: 64 } );
// trigger an artificial keydown event with keyCode 64
jQuery( "body" ).trigger( e );
-
Event Properties
+
Common Event Properties
jQuery normalizes the following properties for cross-browser consistency:
@@ -144,13 +144,12 @@ jQuery( "body" ).trigger( e );
The following properties are also copied to the event object, though some of their values may be undefined depending on the event:
Certain events may have properties specific to them. Those can be accessed as properties of the event.originalEvent object.
-
Example:
+
Other Properties
+
To access event properties not listed above, use the event.originalEvent object:
-// add the dataTransfer property for use with the native `drop` event
-// to capture information about files dropped into the browser window
-jQuery.event.props.push( "dataTransfer" );
+// Access the `dataTransfer` property from the `drop` event which
+// holds the files dropped into the browser window.
+var files = event.originalEvent.dataTransfer.files;
Similar to other content-adding methods such as .prepend() and .before(), .after() also supports passing in multiple arguments as input. Supported input includes DOM elements, jQuery objects, HTML strings, and arrays of DOM elements.
For example, the following will insert two new <div>s and an existing <div> after the first paragraph:
Similar to other content-adding methods such as .prepend() and .before(), .append() also supports passing in multiple arguments as input. Supported input includes DOM elements, jQuery objects, HTML strings, and arrays of DOM elements.
For example, the following will insert two new <div>s and an existing <div> as the last three child nodes of the body:
Similar to other content-adding methods such as .prepend() and .after(), .before() also supports passing in multiple arguments as input. Supported input includes DOM elements, jQuery objects, HTML strings, and arrays of DOM elements.
For example, the following will insert two new <div>s and an existing <div> before the first paragraph:
Similar to other content-adding methods such as .append() and .before(), .prepend() also supports passing in multiple arguments as input. Supported input includes DOM elements, jQuery objects, HTML strings, and arrays of DOM elements.
For example, the following will insert two new <div>s and an existing <div> as the first three child nodes of the body:
This method is a shortcut for .on( "unload", handler ).
The unload event is sent to the window element when the user navigates away from the page. This could mean one of many things. The user could have clicked on a link to leave the page, or typed in a new URL in the address bar. The forward and back buttons will trigger the event. Closing the browser window will cause the event to be triggered. Even a page reload will first create an unload event.
-
The exact handling of the unload event has varied from version to version of browsers. For example, some versions of Firefox trigger the event when a link is followed, but not when the window is closed. In practical usage, behavior should be tested on all supported browsers, and contrasted with the proprietary beforeunload event.
+
The exact handling of the unload event has varied from version to version of browsers. For example, some versions of Firefox trigger the event when a link is followed, but not when the window is closed. In practical usage, behavior should be tested on all supported browsers and contrasted with the similar beforeunload event.
Any unload event handler should be bound to the window object:
From f77c9596a541f4fbe2413ce6db656603bf24c7f7 Mon Sep 17 00:00:00 2001
From: Aurelio De Rosa
Date: Fri, 6 May 2016 10:12:50 +0100
Subject: [PATCH 413/699] jQuery.param: Removed details about traditional flag
Fixes gh-919
Closes gh-924
---
entries/jQuery.param.xml | 1 -
1 file changed, 1 deletion(-)
diff --git a/entries/jQuery.param.xml b/entries/jQuery.param.xml
index 468b6db9..2127f55b 100644
--- a/entries/jQuery.param.xml
+++ b/entries/jQuery.param.xml
@@ -27,7 +27,6 @@
This function is used internally to convert form element values into a serialized string representation (See .serialize() for more information).
As of jQuery 1.3, the return value of a function is used instead of the function as a String.
As of jQuery 1.4, the $.param() method serializes deep objects recursively to accommodate modern scripting languages and frameworks such as PHP and Ruby on Rails. You can disable this functionality globally by setting jQuery.ajaxSettings.traditional = true;.
-
As of jQuery 1.8, the $.param() method no longer uses jQuery.ajaxSettings.traditional as its default setting and will default to false. For best compatibility across versions, call $.param() with an explicit value for the second argument and do not use defaults.
If the object passed is in an Array, it must be an array of objects in the format returned by .serializeArray()
[
From 32c9e324659aa57f1fc8e4a024622609f0144fa2 Mon Sep 17 00:00:00 2001
From: Tom Delmas
Date: Sun, 29 May 2016 15:50:25 +0200
Subject: [PATCH 414/699] Deferred.progress: Document it can take more than 2
arguments
More conform with the .fail and .done doc
Closes gh-933
---
entries/deferred.progress.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/entries/deferred.progress.xml b/entries/deferred.progress.xml
index d1f18cc7..87189af9 100644
--- a/entries/deferred.progress.xml
+++ b/entries/deferred.progress.xml
@@ -14,7 +14,7 @@
- Optional additional function, or array of functions, to be called when the Deferred generates progress notifications.
+ Optional additional functions, or arrays of functions, to be called when the Deferred generates progress notifications.
From 353fb32196bc5dae3efe12ed624b5b4a3cfdd4f1 Mon Sep 17 00:00:00 2001
From: Arthur Verschaeve
Date: Wed, 11 Feb 2015 20:20:56 +0100
Subject: [PATCH 415/699] removeAttr: update note on support in IE
Fixes gh-642
Closes gh-652
---
entries/removeAttr.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/entries/removeAttr.xml b/entries/removeAttr.xml
index 778e328b..92a92b22 100644
--- a/entries/removeAttr.xml
+++ b/entries/removeAttr.xml
@@ -10,7 +10,7 @@
Remove an attribute from each element in the set of matched elements.
The .removeAttr() method uses the JavaScript removeAttribute() function, but it has the advantage of being able to be called directly on a jQuery object and it accounts for different attribute naming across browsers.
-
Note: Removing an inline onclick event handler using .removeAttr() doesn't achieve the desired effect in Internet Explorer 6, 7, or 8. To avoid potential problems, use .prop() instead:
+
Note: Removing an inline onclick event handler using .removeAttr() doesn't achieve the desired effect in Internet Explorer 8, 9 and 11. To avoid potential problems, use .prop() instead:
$element.prop( "onclick", null );
console.log( "onclick property: ", $element[ 0 ].onclick );
From 3185657bf889d3913118581a57bcd690c0265def Mon Sep 17 00:00:00 2001
From: Arthur Verschaeve
Date: Tue, 24 Feb 2015 07:27:16 +0100
Subject: [PATCH 416/699] child-selector: remove sentence about browser support
Closes gh-662
---
entries/child-selector.xml | 1 -
1 file changed, 1 deletion(-)
diff --git a/entries/child-selector.xml b/entries/child-selector.xml
index 5016a1b3..1b1b27c2 100644
--- a/entries/child-selector.xml
+++ b/entries/child-selector.xml
@@ -13,7 +13,6 @@
Selects all direct child elements specified by "child" of elements specified by "parent".
-
As a CSS selector, the child combinator is supported by all modern web browsers including Safari, Firefox, Opera, Chrome, and Internet Explorer 7 and above, but notably not by Internet Explorer versions 6 and below. However, in jQuery, this selector (along with all others) works across all supported browsers, including IE6.
The child combinator (E > F) can be thought of as a more specific form of the descendant combinator (E F) in that it selects only first-level descendants.
From 34b96edacf16dc09f75b7b62ce1f1dc8030a0df7 Mon Sep 17 00:00:00 2001
From: Arthur Verschaeve
Date: Mon, 2 Mar 2015 17:52:39 +0100
Subject: [PATCH 417/699] Ajax: Update notes about jqXHR.success(), .error()
and .complete()
Fixes gh-650
Closes gh-677
---
entries/jQuery.ajax.xml | 6 +++---
entries/jQuery.get.xml | 2 +-
entries/jQuery.getJSON.xml | 2 +-
entries/jQuery.post.xml | 2 +-
4 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/entries/jQuery.ajax.xml b/entries/jQuery.ajax.xml
index 33ce8b72..d5e6a33c 100644
--- a/entries/jQuery.ajax.xml
+++ b/entries/jQuery.ajax.xml
@@ -39,7 +39,7 @@ $.ajax({
- By default, all requests are sent asynchronously (i.e. this is set to true by default). If you need synchronous requests, set this option to false. Cross-domain requests and dataType: "jsonp" requests do not support synchronous operation. Note that synchronous requests may temporarily lock the browser, disabling any actions while the request is active. As of jQuery 1.8, the use of async: false with jqXHR ($.Deferred) is deprecated; you must use the success/error/complete callback options instead of the corresponding methods of the jqXHR object such as jqXHR.done() or the deprecated jqXHR.success().
+ By default, all requests are sent asynchronously (i.e. this is set to true by default). If you need synchronous requests, set this option to false. Cross-domain requests and dataType: "jsonp" requests do not support synchronous operation. Note that synchronous requests may temporarily lock the browser, disabling any actions while the request is active. As of jQuery 1.8, the use of async: false with jqXHR ($.Deferred) is deprecated; you must use the success/error/complete callback options instead of the corresponding methods of the jqXHR object such as jqXHR.done().
@@ -232,7 +232,7 @@ $.ajax({
An alternative construct to the success callback option, the .done() method replaces the deprecated jqXHR.success() method. Refer to deferred.done() for implementation details.
+
An alternative construct to the success callback option, refer to deferred.done() for implementation details.
Deprecation Notice: The jqXHR.success(), jqXHR.error(), and jqXHR.complete() callbacks are deprecated as of jQuery 1.8. To prepare your code for their eventual removal, use jqXHR.done(), jqXHR.fail(), and jqXHR.always() instead.
+
Deprecation Notice: The jqXHR.success(), jqXHR.error(), and jqXHR.complete() callbacks are removed as of jQuery 3.0. You can use jqXHR.done(), jqXHR.fail(), and jqXHR.always() instead.
// Assign handlers immediately after making the request,
diff --git a/entries/jQuery.get.xml b/entries/jQuery.get.xml
index a4e2bcdb..87707e51 100644
--- a/entries/jQuery.get.xml
+++ b/entries/jQuery.get.xml
@@ -75,7 +75,7 @@ jqxhr.always(function() {
});
Deprecation Notice
-
The jqXHR.success(), jqXHR.error(), and jqXHR.complete() callback methods introduced in jQuery 1.5 are deprecated as of jQuery 1.8. To prepare your code for their eventual removal, use jqXHR.done(), jqXHR.fail(), and jqXHR.always() instead.
+
The jqXHR.success(), jqXHR.error(), and jqXHR.complete() callback methods are removed as of jQuery 3.0. You can use jqXHR.done(), jqXHR.fail(), and jqXHR.always() instead.
The jqXHR.success(), jqXHR.error(), and jqXHR.complete() callback methods introduced in jQuery 1.5 are deprecated as of jQuery 1.8. To prepare your code for their eventual removal, use jqXHR.done(), jqXHR.fail(), and jqXHR.always() instead.
+
The jqXHR.success(), jqXHR.error(), and jqXHR.complete() callback methods are removed as of jQuery 3.0. You can use jqXHR.done(), jqXHR.fail(), and jqXHR.always() instead.
The jqXHR.success(), jqXHR.error(), and jqXHR.complete() callback methods introduced in jQuery 1.5 are deprecated as of jQuery 1.8. To prepare your code for their eventual removal, use jqXHR.done(), jqXHR.fail(), and jqXHR.always() instead.
+
The jqXHR.success(), jqXHR.error(), and jqXHR.complete() callback methods are removed as of jQuery 3.0. You can use jqXHR.done(), jqXHR.fail(), and jqXHR.always() instead.
From 5fe9b733eaa5de2f2e8beb3752272212961dec49 Mon Sep 17 00:00:00 2001
From: Arthur Verschaeve
Date: Thu, 9 Apr 2015 15:15:12 +0200
Subject: [PATCH 418/699] unwrap: add `selector` argument
Fixes gh-689
Closes gh-711
---
entries/unwrap.xml | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/entries/unwrap.xml b/entries/unwrap.xml
index d966952c..d3a7b405 100644
--- a/entries/unwrap.xml
+++ b/entries/unwrap.xml
@@ -4,6 +4,12 @@
1.4
+
+ 3.0
+
+ A selector to check the parent element against. If an element's parent does not match the selector, the element won't be unwrapped.
+
+ 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.
From d19cd776a38e23d2bc66e6bf09ec51c0fc2707b0 Mon Sep 17 00:00:00 2001
From: Arthur Verschaeve
Date: Mon, 6 Apr 2015 16:06:09 +0200
Subject: [PATCH 419/699] Selector: correct `removed` version number
Fixes gh-696
Ref gh-702
---
entries/selector.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/entries/selector.xml b/entries/selector.xml
index 76a0ea5e..e9e61c1e 100644
--- a/entries/selector.xml
+++ b/entries/selector.xml
@@ -1,5 +1,5 @@
-
+.selector1.3
From ad85901ab2cc3ab72351c5a1e7c3a1a4491a1340 Mon Sep 17 00:00:00 2001
From: Arthur Verschaeve
Date: Thu, 9 Apr 2015 19:19:50 +0200
Subject: [PATCH 420/699] Context: removed in 3.0
Closes gh-702
---
entries/context.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/entries/context.xml b/entries/context.xml
index a7377fa1..0cf0f7b4 100644
--- a/entries/context.xml
+++ b/entries/context.xml
@@ -1,5 +1,5 @@
-
+.context1.3
From b642f08baf04b2c92655a29e41227399765510f8 Mon Sep 17 00:00:00 2001
From: Arthur Verschaeve
Date: Sun, 24 May 2015 22:06:17 +0200
Subject: [PATCH 421/699] wrapAll: change description of function argument
Fixes gh-605
Closes gh-745
---
entries/wrapAll.xml | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/entries/wrapAll.xml b/entries/wrapAll.xml
index c6dc02ca..7d8c741d 100644
--- a/entries/wrapAll.xml
+++ b/entries/wrapAll.xml
@@ -14,8 +14,7 @@
1.4
- A callback function returning the HTML content or jQuery object to wrap around the matched elements. Receives the index position of the element in the set as an argument. Within the function, this refers to the current element in the set.
-
+ A callback function returning the HTML content or jQuery object to wrap around all the matched elements. Within the function, this refers to the first element in the set. Prior to jQuery 3.0, the callback was incorrectly called for every element in the set and received the index position of the element in the set as an argument.
From 870eb805664a36257ac6f7761e7ead3ec34b51fa Mon Sep 17 00:00:00 2001
From: Aurelio De Rosa
Date: Sun, 14 Jun 2015 14:55:40 +0100
Subject: [PATCH 422/699] data: Document behavior changes
Document changes that align the method to the Dataset API's behavior
Fixes gh-730
Closes gh-758
---
entries/data.xml | 2 ++
1 file changed, 2 insertions(+)
diff --git a/entries/data.xml b/entries/data.xml
index f54a229c..80ccee99 100644
--- a/entries/data.xml
+++ b/entries/data.xml
@@ -31,6 +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](http://www.w3.org/TR/html5/dom.html#dom-dataset). 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.
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" }.
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.
+
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.
All option elements are considered hidden, regardless of their selected state.
During animations that hide an element, the element is considered visible until the end of the animation. During animations to show an element, the element is considered visible at the start at the animation.
How :visible is calculated was changed in jQuery 1.3.2. The release notes outline the changes in more detail.
+
jQuery 3 slightly modifies the meaning of :visible (and therefore of :hidden). Starting with this version, elements will be considered :visible if they have any layout boxes, including those of zero width and/or height. For example, br elements and inline elements with no content will be selected by the :visible selector.
From 5854b44ba5f6afd8b356e5c2417eadc3cf29a118 Mon Sep 17 00:00:00 2001
From: Aurelio De Rosa
Date: Mon, 19 Oct 2015 00:47:01 +0100
Subject: [PATCH 424/699] isNumeric: Updated description based on new behavior
Fixes gh-817
Closes gh-819
---
entries/jQuery.isNumeric.xml | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/entries/jQuery.isNumeric.xml b/entries/jQuery.isNumeric.xml
index 7a4e7f6c..b51eb84d 100644
--- a/entries/jQuery.isNumeric.xml
+++ b/entries/jQuery.isNumeric.xml
@@ -9,7 +9,8 @@
-
The $.isNumeric() method checks whether a value is a finite number, or would be cast to one by Number. If so, it returns true. Otherwise it returns false. The argument can be of any type.
+
The $.isNumeric() method checks whether its argument represents a numeric value. If so, it returns true. Otherwise it returns false. The argument can be of any type.
+
As of jQuery 3.0 $.isNumeric() returns true only if the argument is of type number, or if it's of type string and it can be coerced into finite numbers. In all other cases, it returns false.
Sample return values of $.isNumeric with various inputs.
From d6d3e7a8f8d7de252ab721989f96f7425ae50231 Mon Sep 17 00:00:00 2001
From: Aurelio De Rosa
Date: Fri, 8 Jan 2016 00:33:39 +0000
Subject: [PATCH 425/699] toggleClass: Document deprecation of a signature
Fixes gh-851
Closes gh-860
---
entries/toggleClass.xml | 176 ++++++++++++++++++++--------------------
1 file changed, 90 insertions(+), 86 deletions(-)
diff --git a/entries/toggleClass.xml b/entries/toggleClass.xml
index f14cb8ed..5a18aa05 100644
--- a/entries/toggleClass.xml
+++ b/entries/toggleClass.xml
@@ -1,69 +1,62 @@
-
- .toggleClass()
-
- 1.0
-
- One or more class names (separated by spaces) to be toggled for each element in the matched set.
-
-
-
- 1.3
-
- One or more class names (separated by spaces) to be toggled for each element in the matched set.
-
-
- A Boolean (not just truthy/falsy) value to determine whether the class should be added or removed.
-
-
-
- 1.4
-
- A boolean value to determine whether the class should be added or removed.
-
-
-
- 1.4
-
-
-
-
-
- A function that returns class names to be toggled in the class attribute of each element in the matched set. Receives the index position of the element in the set, the old class value, and the state as arguments.
-
-
- A boolean value to determine whether the class should be added or removed.
-
-
- Add or remove one or more classes from each element in the set of matched elements, depending on either the class's presence or the value of the state argument.
-
-
Before jQuery version 1.12/2.2, the .toggleClass() method manipulated the classNameproperty of the selected elements, not the classattribute. Once the property was changed, it was the browser that updated the attribute accordingly. An implication of this behavior was that this method only worked for documents with HTML DOM semantics (e.g., not pure XML documents).
-
As of jQuery 1.12/2.2, this behavior is changed to improve the support for XML documents, including SVG. Starting from this version, the classattribute is used instead. So, .toggleClass() can be used on XML or SVG documents.
-
This method takes one or more class names as its parameter. In the first version, if an element in the matched set of elements already has the class, then it is removed; if an element does not have the class, then it is added. For example, we can apply .toggleClass() to a simple <div>:
-
+
+
+ .toggleClass()
+
+ 1.0
+
+ One or more class names (separated by spaces) to be toggled for each element in the matched set.
+
+
+
+ 1.3
+
+ One or more class names (separated by spaces) to be toggled for each element in the matched set.
+
+
+ A Boolean (not just truthy/falsy) value to determine whether the class should be added or removed.
+
+
+
+ 1.4
+
+
+
+
+
+ A function that returns class names to be toggled in the class attribute of each element in the matched set. Receives the index position of the element in the set, the old class value, and the state as arguments.
+
+
+ A boolean value to determine whether the class should be added or removed.
+
+
+ Add or remove one or more classes from each element in the set of matched elements, depending on either the class's presence or the value of the state argument.
+
+
This method takes one or more class names as its parameter. In the first version, if an element in the matched set of elements already has the class, then it is removed; if an element does not have the class, then it is added. For example, we can apply .toggleClass() to a simple <div>:
+
<div class="tumble">Some text.</div>
-
-
The first time we apply $( "div.tumble" ).toggleClass( "bounce" ), we get the following:
-
+
+
The first time we apply $( "div.tumble" ).toggleClass( "bounce" ), we get the following:
+
<div class="tumble bounce">Some text.</div>
-
-
The second time we apply $( "div.tumble" ).toggleClass( "bounce" ), the <div> class is returned to the single tumble value:
-
<div class="tumble">Some text.</div>
-
Applying .toggleClass( "bounce spin" ) to the same <div> alternates between <div class="tumble bounce spin"> and <div class="tumble">.
-
The second version of .toggleClass() uses the second parameter for determining whether the class should be added or removed. If this parameter's value is true, then the class is added; if false, the class is removed. In essence, the statement:
-
+
+
The second time we apply $( "div.tumble" ).toggleClass( "bounce" ), the <div> class is returned to the single tumble value:
+
<div class="tumble">Some text.</div>
+
Applying .toggleClass( "bounce spin" ) to the same <div> alternates between <div class="tumble bounce spin"> and <div class="tumble">.
+
The second version of .toggleClass() uses the second parameter for determining whether the class should be added or removed. If this parameter's value is true, then the class is added; if false, the class is removed. In essence, the statement:
As of jQuery 1.4, if no arguments are passed to .toggleClass(), all class names on the element the first time .toggleClass() is called will be toggled. Also as of jQuery 1.4, the class name to be toggled can be determined by passing in a function.
-
+
+
As of jQuery 1.4, if no arguments are passed to .toggleClass(), all class names on the element the first time .toggleClass() is called will be toggled. Also as of jQuery 1.4, the class name to be toggled can be determined by passing in a function.
This example will toggle the happy class for <div class="foo"> elements if their parent element has a class of bar; otherwise, it will toggle the sad class.
-
-
- Toggle the class 'highlight' when a paragraph is clicked.
-
+
This example will toggle the happy class for <div class="foo"> elements if their parent element has a class of bar; otherwise, it will toggle the sad class.
+
+
+ Toggle the class 'highlight' when a paragraph is clicked.
+
-
- Click to toggle
highlight
on these
paragraphs
]]>
-
-
- Add the "highlight" class to the clicked paragraph on every third click of that paragraph, remove it every first and second click.
-
+
+ Add the "highlight" class to the clicked paragraph on every third click of that paragraph, remove it every first and second click.
+
-
- Click to toggle (clicks: 0)
highlight (clicks: 0)
on these (clicks: 0)
paragraphs (clicks: 0)
]]>
-
-
- Toggle the class name(s) indicated on the buttons for each div.
-
-
+
+ Toggle the class name(s) indicated on the buttons for each div.
+ div {
float: left;
width: 100px;
@@ -158,7 +150,7 @@ $( "p" ).each(function() {
background-color: cornsilk;
}
]]>
-
@@ -173,7 +165,7 @@ $( "p" ).each(function() {
]]>
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+ 1.4
+
+ A boolean value to determine whether the class should be added or removed.
+
+
+
+
This signature (only!) is deprecated as of jQuery 3.0.
+
+
+
\ No newline at end of file
From 956f186173eb35bf1f8ac9b5d3fd19679d1ca257 Mon Sep 17 00:00:00 2001
From: Aurelio De Rosa
Date: Fri, 11 Mar 2016 01:12:46 +0000
Subject: [PATCH 426/699] jQuery.parseJSON: Added deprecation note for jQuery 3
Fixes gh-898
Closes gh-899
---
entries/jQuery.parseJSON.xml | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/entries/jQuery.parseJSON.xml b/entries/jQuery.parseJSON.xml
index bc9dcc78..d0965e41 100644
--- a/entries/jQuery.parseJSON.xml
+++ b/entries/jQuery.parseJSON.xml
@@ -1,5 +1,5 @@
-
+
@@ -26,6 +26,7 @@
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/.
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.
+
As of jQuery 3.0, $.parseJSON is deprecated. To parse JSON objects, use the native JSON.parse method instead.
Parse a JSON string.
From 0d09c6a70ae16ec2098c8a9d67fb5c92fb53624b Mon Sep 17 00:00:00 2001
From: Aurelio De Rosa
Date: Thu, 7 Apr 2016 01:03:27 +0100
Subject: [PATCH 427/699] jQuery.parseHTML: Specified behavior of version 3
Fixes gh-903
Closes gh-907
---
entries/jQuery.parseHTML.xml | 1 +
1 file changed, 1 insertion(+)
diff --git a/entries/jQuery.parseHTML.xml b/entries/jQuery.parseHTML.xml
index 930d60a2..5354627a 100644
--- a/entries/jQuery.parseHTML.xml
+++ b/entries/jQuery.parseHTML.xml
@@ -17,6 +17,7 @@
jQuery.parseHTML uses native methods to convert the string to a set of DOM nodes, which can then be inserted into the document. These methods do render all trailing or leading text (even if that's just whitespace). To prevent trailing/leading whitespace from being converted to text nodes you can pass the HTML string through jQuery.trim.
By default, the context is the current document if not specified or given as null or undefined. If the HTML was to be used in another document such as an iframe, that frame's document could be used.
+
As of 3.0 the default behavior is changed. If the context is not specified or given as null or undefined, a new document is used. This can potentially improve security because inline events will not execute when the HTML is parsed. Once the parsed HTML is injected into a document it does execute, but this gives tools a chance to traverse the created DOM and remove anything deemed unsafe. This improvement does not apply to internal uses of jQuery.parseHTML as they usually pass in the current document. Therefore, a statement like $( "#log" ).append( $( htmlString ) ) is still subject to the injection of malicious code.
Security Considerations
Most jQuery APIs that accept HTML strings will run scripts that are included in the HTML. jQuery.parseHTML does not run scripts in the parsed HTML unless keepScripts is explicitly true. However, it is still possible in most environments to execute scripts indirectly, for example via the <img onerror> attribute. The caller should be aware of this and guard against it by cleaning or escaping any untrusted inputs from sources such as the URL or cookies. For future compatibility, callers should not depend on the ability to run any script content when keepScripts is unspecified or false.
From a062f9fc82c3a24789d157fc0508d07ab198edb8 Mon Sep 17 00:00:00 2001
From: Aurelio De Rosa
Date: Fri, 20 May 2016 01:28:05 +0100
Subject: [PATCH 428/699] jQuery.param: Updated version for traditional flag
Ref gh-924
Closes gh-932
---
entries/jQuery.param.xml | 1 +
1 file changed, 1 insertion(+)
diff --git a/entries/jQuery.param.xml b/entries/jQuery.param.xml
index 2127f55b..9a80fc2b 100644
--- a/entries/jQuery.param.xml
+++ b/entries/jQuery.param.xml
@@ -27,6 +27,7 @@
This function is used internally to convert form element values into a serialized string representation (See .serialize() for more information).
As of jQuery 1.3, the return value of a function is used instead of the function as a String.
As of jQuery 1.4, the $.param() method serializes deep objects recursively to accommodate modern scripting languages and frameworks such as PHP and Ruby on Rails. You can disable this functionality globally by setting jQuery.ajaxSettings.traditional = true;.
+
As of jQuery 3.0, the $.param() method no longer uses jQuery.ajaxSettings.traditional as its default setting and will default to false. For best compatibility across versions, call $.param() with an explicit value for the second argument and do not use defaults.
If the object passed is in an Array, it must be an array of objects in the format returned by .serializeArray()
[
From b2e0296987e67e431caf0c5df2af869ee9702e8e Mon Sep 17 00:00:00 2001
From: Aurelio De Rosa
Date: Wed, 1 Jun 2016 01:04:58 +0100
Subject: [PATCH 429/699] jQuery.escapeSelector: Created entry
Fixes gh-880
Closes gh-934
---
entries/jQuery.escapeSelector.xml | 29 +++++++++++++++++++++++++++++
1 file changed, 29 insertions(+)
create mode 100644 entries/jQuery.escapeSelector.xml
diff --git a/entries/jQuery.escapeSelector.xml b/entries/jQuery.escapeSelector.xml
new file mode 100644
index 00000000..9e9a91d1
--- /dev/null
+++ b/entries/jQuery.escapeSelector.xml
@@ -0,0 +1,29 @@
+
+
+ jQuery.escapeSelector()
+ Escapes any character that has a special meaning in a CSS selector.
+
+ 3.0
+
+ A string containing a selector expression to escape.
+
+
+
+
This method is useful for situations where a class name or an ID contains characters that have a special meaning in CSS, such as the dot or the semicolon.
+
The method is essentially a shim for the CSS Working Group's CSS.escape() method. The main difference is that $.escapeSelector() can be reliably used in all of jQuery's supported browsers.
+
+
+ Escape an ID containing a hash.
+
+
+
+ Select all the elements having a class name of .box inside a div.
+
+
+
+
+
From a6452420b248ac519a93084ff9a539a3d0a954f5 Mon Sep 17 00:00:00 2001
From: Timmy Willison
Date: Thu, 9 Jun 2016 17:26:02 -0400
Subject: [PATCH 430/699] 1.12.4
---
package.json | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/package.json b/package.json
index 20678798..5703775b 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.3",
+ "version": "1.12.4",
"homepage": "https://github.com/jquery/api.jquery.com",
"author": {
"name": "jQuery Foundation and other contributors"
From 2dcad72a2f3eed7e0e1d37efc16b8424f9a7f8aa Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Micha=C5=82=20Go=C5=82e=CC=A8biowski?=
Date: Fri, 10 Jun 2016 00:07:34 +0200
Subject: [PATCH 431/699] categories: Change links from http to https
---
categories.xml | 56 +++++++++++++++++++++++++-------------------------
1 file changed, 28 insertions(+), 28 deletions(-)
diff --git a/categories.xml b/categories.xml
index c181a548..dd4b277a 100644
--- a/categories.xml
+++ b/categories.xml
@@ -38,7 +38,7 @@
For more information, see the jQuery 1.3 Release Notes.
+
]]>
@@ -98,7 +98,7 @@
jQuery's event system normalizes the event object according to W3C standards. The event object is guaranteed to be passed to the event handler. Most properties from the original event are copied over and normalized to the new event object.
+
jQuery's event system normalizes the event object according to W3C standards. The event object is guaranteed to be passed to the event handler. Most properties from the original event are copied over and normalized to the new event object.
jQuery.Event Constructor
The jQuery.Event constructor is exposed and can be used when calling trigger. The new operator is optional.
@@ -238,13 +238,13 @@ var files = event.originalEvent.dataTransfer.files;
Borrowing from CSS 1–3, and then adding its own, jQuery offers a powerful set of tools for matching a set of elements in a document.
-
To use any of the meta-characters ( such as !"#$%&'()*+,./:;<=>?@[\]^`{|}~ ) as a literal part of a name, it must be escaped with with two backslashes: \\. For example, an element with id="foo.bar", can use the selector $("#foo\\.bar"). The W3C CSS specification contains the complete set of rules regarding valid CSS selectors. Also useful is the blog entry by Mathias Bynens on CSS character escape sequences for identifiers.
+
To use any of the meta-characters ( such as !"#$%&'()*+,./:;<=>?@[\]^`{|}~ ) as a literal part of a name, it must be escaped with with two backslashes: \\. For example, an element with id="foo.bar", can use the selector $("#foo\\.bar"). The W3C CSS specification contains the complete set of rules regarding valid CSS selectors. Also useful is the blog entry by Mathias Bynens on CSS character escape sequences for identifiers.
]]>The CSS specification allows elements to be identified by their attributes. While not supported by some older browsers for the purpose of styling documents, jQuery allows you to employ them regardless of the browser being used.
When using any of the following attribute selectors, you should account for attributes that have multiple, space-separated values. Since these selectors see attribute values as a single string, this selector, for example, $("a[rel='nofollow']"), will select <a href="example.html" rel="nofollow">Some text</a> but not <a href="example.html" rel="nofollow foe">Some text</a>.
-
Attribute values in selector expressions must follow the rules for W3C CSS selectors; in general, that means anything other than a valid identifier should be surrounded by quotation marks.
+
Attribute values in selector expressions must follow the rules for W3C CSS selectors; in general, that means anything other than a valid identifier should be surrounded by quotation marks.
double quotes inside single quotes: $('a[rel="nofollow self"]')
single quotes inside double quotes: $("a[rel='nofollow self']")
@@ -258,7 +258,7 @@ var files = event.originalEvent.dataTransfer.files;
- http://www.w3.org/Style/CSS/#specs. ]]>
+ https://www.w3.org/Style/CSS/#specs. ]]>
@@ -276,7 +276,7 @@ var files = event.originalEvent.dataTransfer.files;
- querySelectorAll() method. To achieve the best performance when using these selectors, first select some elements using a pure CSS selector, then use .filter().]]>
+ querySelectorAll() method. To achieve the best performance when using these selectors, first select some elements using a pure CSS selector, then use .filter().]]>
@@ -302,52 +302,52 @@ var files = event.originalEvent.dataTransfer.files;
jQuery 1.0 Release Notes.
+ jQuery 1.0 Release Notes.
]]>1.0.1, 1.0.2, 1.0.3, 1.0.4.
+ Release Notes: 1.0.1, 1.0.2, 1.0.3, 1.0.4.
]]>jQuery 1.1 Release Notes.
+ jQuery 1.1 Release Notes.
]]>jQuery 1.1.2 Release Notes.
+ jQuery 1.1.2 Release Notes.
]]>jQuery 1.1.3 Release Notes
+ jQuery 1.1.3 Release Notes
]]>jQuery 1.1.4 Release Notes.
+ jQuery 1.1.4 Release Notes.
]]>jQuery 1.2 Release Notes
+ jQuery 1.2 Release Notes
]]>1.2.1, 1.2.2, 1.2.3.
+ Release Notes: 1.2.1, 1.2.2, 1.2.3.
]]>jQuery 1.2.6 Release Notes.
+ jQuery 1.2.6 Release Notes.
]]>1.3, 1.3.1, 1.3.2
+ Release Notes: 1.3, 1.3.1, 1.3.2
]]>
@@ -362,22 +362,22 @@ var files = event.originalEvent.dataTransfer.files;
jQuery 1.4.2 Release Notes.
+ jQuery 1.4.2 Release Notes.
]]>jQuery 1.4.3 Release Notes.
+ jQuery 1.4.3 Release Notes.
]]>
- jQuery 1.4.4 Release Notes.]]>
+ jQuery 1.4.4 Release Notes.]]>All the aspects of the API that were added, or had a new signature added, in the corresponding version of jQuery.
-
jQuery 1.5 also includes a large rewrite of the Ajax module, which has a number of extensibility improvements. You can find out more about those improvements in the Extending Ajax documentation.
-
Additionally jQuery 1.5 includes a new Deferred callback management system you can learn more about in in the Deferred Object documentation.
+
jQuery 1.5 also includes a large rewrite of the Ajax module, which has a number of extensibility improvements. You can find out more about those improvements in the Extending Ajax documentation.
+
Additionally jQuery 1.5 includes a new Deferred callback management system you can learn more about in in the Deferred Object documentation.
]]>
@@ -394,7 +394,7 @@ var files = event.originalEvent.dataTransfer.files;
jQuery.Callbacks()
Toggling Animations Work Intuitively
-
]]>
@@ -402,7 +402,7 @@ var files = event.originalEvent.dataTransfer.files;
Aspects of the API that were changed in the corresponding version of jQuery. API changes in jQuery 1.8.0 dealt primarily with animations and the removal of some methods such as deferred.isResolved(), deferred.isRejected(), $.curCSS(), $.attrFn(), and $(element).closest(Array) returning Array.
-
]]>
@@ -410,7 +410,7 @@ var files = event.originalEvent.dataTransfer.files;
Aspects of the API that were changed in the corresponding version of jQuery. Changes in jQuery 1.9 dealt primarily removal or modification of several APIs that behaved inconsistently or inefficiently in the past. A jQuery Migrate Plugin was offered to help developers with a transitional upgrade path.
-
]]>
From cdb0c5ba6b3af574134acc13b10144e0a9dc2107 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Micha=C5=82=20Go=C5=82e=CC=A8biowski?=
Date: Fri, 10 Jun 2016 00:08:50 +0200
Subject: [PATCH 432/699] categories: Correct a typo
---
categories.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/categories.xml b/categories.xml
index dd4b277a..937f6ab5 100644
--- a/categories.xml
+++ b/categories.xml
@@ -408,7 +408,7 @@ var files = event.originalEvent.dataTransfer.files;
Aspects of the API that were changed in the corresponding version of jQuery. Changes in jQuery 1.9 dealt primarily removal or modification of several APIs that behaved inconsistently or inefficiently in the past. A jQuery Migrate Plugin was offered to help developers with a transitional upgrade path.
+
Aspects of the API that were changed in the corresponding version of jQuery. Changes in jQuery 1.9 dealt primarily with removal or modification of several APIs that behaved inconsistently or inefficiently in the past. A jQuery Migrate Plugin was offered to help developers with a transitional upgrade path.
From 55946446c4971a2f10f21af65847ef9358b57af4 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Micha=C5=82=20Go=C5=82e=CC=A8biowski?=
Date: Fri, 10 Jun 2016 00:13:45 +0200
Subject: [PATCH 433/699] categories: Add the 3.0 section
Fixes #937
Closes #938
---
categories.xml | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/categories.xml b/categories.xml
index 937f6ab5..a7190a24 100644
--- a/categories.xml
+++ b/categories.xml
@@ -414,6 +414,14 @@ var files = event.originalEvent.dataTransfer.files;
]]>
+
+ Aspects of the API that were changed in the corresponding version of jQuery. Changes in jQuery 3.0 dealt primarily with deferreds, data, show/hide and removal of some deprecated APIs. A jQuery Migrate Plugin was offered to help developers with a transitional upgrade path.
+
+
+
+ ]]>
+
From 93110b7fd8824a467b6e585d520d29c9d51b0092 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Micha=C5=82=20Go=C5=82e=CC=A8biowski?=
Date: Sat, 11 Jun 2016 00:56:16 +0200
Subject: [PATCH 434/699] 1.12.5
---
package.json | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/package.json b/package.json
index 5703775b..2c0fb08a 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.4",
+ "version": "1.12.5",
"homepage": "https://github.com/jquery/api.jquery.com",
"author": {
"name": "jQuery Foundation and other contributors"
From 7af26e3158e68415a1b5f28cf7b96dcc1515d2c3 Mon Sep 17 00:00:00 2001
From: Aurelio De Rosa
Date: Fri, 1 Jul 2016 17:19:15 +0100
Subject: [PATCH 435/699] data: Replaced URL markdown syntax with HTML
Fixes gh-943
Closes gh-944
---
entries/data.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/entries/data.xml b/entries/data.xml
index 80ccee99..3606395d 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](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" }.
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.
From ef3cc87ef771de72853f8f73118e02605a3ac82b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Micha=C5=82=20Go=C5=82e=CC=A8biowski?=
Date: Wed, 6 Jul 2016 11:11:55 +0200
Subject: [PATCH 436/699] 1.12.6
---
package.json | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/package.json b/package.json
index 2c0fb08a..28ef474a 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.5",
+ "version": "1.12.6",
"homepage": "https://github.com/jquery/api.jquery.com",
"author": {
"name": "jQuery Foundation and other contributors"
From abe47693da490850e3c545c74a6ebcc14989c9fc Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Micha=C5=82=20Go=C5=82e=CC=A8biowski?=
Date: Wed, 6 Jul 2016 11:36:39 +0200
Subject: [PATCH 437/699] jQuery.readyException: Add the page, add the 3.1
category
Fixes #942
Closes #946
---
categories.xml | 6 ++++++
entries/jQuery.readyException.xml | 24 ++++++++++++++++++++++++
2 files changed, 30 insertions(+)
create mode 100644 entries/jQuery.readyException.xml
diff --git a/categories.xml b/categories.xml
index a7190a24..55038248 100644
--- a/categories.xml
+++ b/categories.xml
@@ -422,6 +422,12 @@ var files = event.originalEvent.dataTransfer.files;
]]>
+
+ jQuery.readyException was added.
+
+ ]]>
+
diff --git a/entries/jQuery.readyException.xml b/entries/jQuery.readyException.xml
new file mode 100644
index 00000000..2c534ea9
--- /dev/null
+++ b/entries/jQuery.readyException.xml
@@ -0,0 +1,24 @@
+
+
+ jQuery.readyException()
+ Handles errors thrown synchronously in functions wrapped in jQuery().
+
+ 3.1
+
+ An error thrown in the function wrapped in jQuery().
+
+
+
+
This method is fired when an error is thrown synchronously in a function wrapped in jQuery() or jQuery( document ).ready(), or equivalent. By default it re-throws the error in a timeout so that it's logged in the console and passed to window.onerror instead of being swallowed. Overwrite this method if you want to handle such errors differently.
+
+
+ Pass the received error to console.error.
+
+
+
+
+
From d143a116554e8a70267dfe38453a7398b5e3463f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Micha=C5=82=20Go=C5=82e=CC=A8biowski?=
Date: Fri, 8 Jul 2016 01:01:41 +0200
Subject: [PATCH 438/699] 1.12.7
---
package.json | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/package.json b/package.json
index 28ef474a..266fe856 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.6",
+ "version": "1.12.7",
"homepage": "https://github.com/jquery/api.jquery.com",
"author": {
"name": "jQuery Foundation and other contributors"
From 2b3ebc617f525a1b7c7f6c89e8fe5e97c54534f7 Mon Sep 17 00:00:00 2001
From: Karl Swedberg
Date: Thu, 14 Jul 2016 08:34:39 -0400
Subject: [PATCH 439/699] val(): Update select multiple no selected statement
for 3.0. Fixes #828
---
entries/val.xml | 13 +++++++------
1 file changed, 7 insertions(+), 6 deletions(-)
diff --git a/entries/val.xml b/entries/val.xml
index 1ba0c365..7ab00ff3 100644
--- a/entries/val.xml
+++ b/entries/val.xml
@@ -11,7 +11,8 @@
Get the current value of the first element in the set of matched elements.
-
The .val() method is primarily used to get the values of form elements such as input, select and textarea. When the first element in the collection is a select-multiple (i.e., a select element with the multiple attribute set), it returns an array containing the value of each selected option, or null if no options are selected. When called on an empty collection, it returns undefined.
+
The .val() method is primarily used to get the values of form elements such as input, select and textarea. When called on an empty collection, it returns undefined.
+
When the first element in the collection is a select-multiple (i.e., a select element with the multiple attribute set), .val() returns an array containing the value of each selected option. As of jQuery 3.0, if no options are selected, it returns an empty array; prior to jQuery 3.0, it returns null.
For selects and checkboxes, you can also use the :selected and :checked selectors to get at values, for example:
// Get the value from a dropdown select
@@ -27,7 +28,7 @@ $( "input:checkbox:checked" ).val();
$( "input:radio[name=bar]:checked" ).val();
-
Note: At present, using .val() on textarea elements strips carriage return characters from the browser-reported value. When this value is sent to the server via XHR however, carriage returns are preserved (or added by browsers which do not include them in the raw value). A workaround for this issue can be achieved using a valHook as follows:
+
Note: At present, using .val() on textarea elements strips carriage return characters from the browser-reported value. When this value is sent to the server via XHR, however, carriage returns are preserved (or added by browsers which do not include them in the raw value). A workaround for this issue can be achieved using a valHook as follows:
$.valHooks.textarea = {
@@ -115,17 +116,17 @@ $( "input" )
1.4
-
-
+
+ A function returning the value to set. this is the current element. Receives the index position of the element in the set and the old value as arguments.Set the value of each element in the set of matched elements.
This method is typically used to set the values of form fields.
-
val() allows you to pass an array of element values. This is useful when working on a jQuery object containing elements like <input type="checkbox">, <input type="radio">, and <option>s inside of a <select>. In this case, the inputs and the options having a value that matches one of the elements of the array will be checked or selected while those having a value that don't match one of the elements of the array will be unchecked or unselected, depending on the type. In case of <input type="radio">s that are part of a radio group and <select>s, any previously selected element will be deselected.
+
val() allows you to pass an array of element values. This is useful when working on a jQuery object containing elements like <input type="checkbox">, <input type="radio">, and <option>s inside of a <select>. In this case, the inputs and the options having a value that matches one of the elements of the array will be checked or selected while those having a value that doesn't match one of the elements of the array will be unchecked or unselected, depending on the type. In the case of <input type="radio">s that are part of a radio group and <select>s, any previously selected element will be deselected.
Setting values using this method (or using the native value property) does not cause the dispatch of the change event. For this reason, the relevant event handlers will not be executed. If you want to execute them, you should call .trigger( "change" ) after setting the value.
-
The .val() method allows us to set the value by passing in a function. As of jQuery 1.4, the function is passed two arguments, the current element's index and its current value:
+
The .val() method allows settting the value by passing in a function. As of jQuery 1.4, the function is passed two arguments, the current element's index and its current value:
+
diff --git a/entries/error.xml b/entries/error.xml
index 872ff70d..6f646aa2 100644
--- a/entries/error.xml
+++ b/entries/error.xml
@@ -1,5 +1,5 @@
-
+.error()Bind an event handler to the "error" JavaScript event.
@@ -60,4 +60,5 @@ $( "img" )
+
diff --git a/entries/load-event.xml b/entries/load-event.xml
index d95f81bc..e3739cb7 100644
--- a/entries/load-event.xml
+++ b/entries/load-event.xml
@@ -1,5 +1,5 @@
-
+.load()Bind an event handler to the "load" JavaScript event.
@@ -76,4 +76,5 @@ $( "img.userIcon" ).load(function() {
+
diff --git a/entries/size.xml b/entries/size.xml
index 2d092a37..e7dd1223 100644
--- a/entries/size.xml
+++ b/entries/size.xml
@@ -1,5 +1,5 @@
-
+.size()1.0
@@ -66,4 +66,5 @@ $( document.body )
+
diff --git a/entries/unload.xml b/entries/unload.xml
index 173d560e..1306ddd6 100644
--- a/entries/unload.xml
+++ b/entries/unload.xml
@@ -1,5 +1,5 @@
-
+.unload()1.0
@@ -46,4 +46,5 @@ $( window ).unload(function() {
+
From d5398a69edf4a97a44b49333e7ddefba36edc981 Mon Sep 17 00:00:00 2001
From: Aurelio De Rosa
Date: Tue, 19 Apr 2016 02:12:21 +0100
Subject: [PATCH 441/699] jQuery.uniqueSort: Fixed category name
Fixes gh-908
Closes gh-913
---
categories.xml | 8 ++++++++
entries/jQuery.uniqueSort.xml | 3 ++-
2 files changed, 10 insertions(+), 1 deletion(-)
diff --git a/categories.xml b/categories.xml
index 55038248..d4d31106 100644
--- a/categories.xml
+++ b/categories.xml
@@ -414,6 +414,14 @@ var files = event.originalEvent.dataTransfer.files;
]]>
+
+ Aspects of the API that were changed in the corresponding versions of jQuery. Changes in jQuery 1.12 and 2.2 includes performance improvements of the selector engine, manipulation of class names for SVG elements, support for the Symbol type and iterators added in ES2015, and a new hook has been added for filtering HTML. A jQuery Migrate Plugin was offered to help developers with a transitional upgrade path.
+
+
+
+ ]]>
+ Aspects of the API that were changed in the corresponding version of jQuery. Changes in jQuery 3.0 dealt primarily with deferreds, data, show/hide and removal of some deprecated APIs. A jQuery Migrate Plugin was offered to help developers with a transitional upgrade path.
diff --git a/entries/jQuery.uniqueSort.xml b/entries/jQuery.uniqueSort.xml
index a1927bda..88735af9 100644
--- a/entries/jQuery.uniqueSort.xml
+++ b/entries/jQuery.uniqueSort.xml
@@ -2,7 +2,7 @@
jQuery.uniqueSort()
- 1.12/2.2
+ 1.12-2.2The Array of DOM elements.
@@ -42,4 +42,5 @@ $( "div:eq(2)" ).text( "Post-unique there are " + divs.length + " elements." )
]]>