|
1 | 1 | /*! |
2 | | - * jQuery JavaScript Library v2.2.0 |
| 2 | + * jQuery JavaScript Library v2.2.1 |
3 | 3 | * http://jquery.com/ |
4 | 4 | * |
5 | 5 | * Includes Sizzle.js |
|
9 | 9 | * Released under the MIT license |
10 | 10 | * http://jquery.org/license |
11 | 11 | * |
12 | | - * Date: 2016-01-08T20:02Z |
| 12 | + * Date: 2016-02-22T19:11Z |
13 | 13 | */ |
14 | 14 |
|
15 | 15 | (function( global, factory ) { |
@@ -65,7 +65,7 @@ var support = {}; |
65 | 65 |
|
66 | 66 |
|
67 | 67 | var |
68 | | - version = "2.2.0", |
| 68 | + version = "2.2.1", |
69 | 69 |
|
70 | 70 | // Define a local copy of jQuery |
71 | 71 | jQuery = function( selector, context ) { |
@@ -4479,7 +4479,7 @@ function on( elem, types, selector, data, fn, one ) { |
4479 | 4479 | if ( fn === false ) { |
4480 | 4480 | fn = returnFalse; |
4481 | 4481 | } else if ( !fn ) { |
4482 | | - return this; |
| 4482 | + return elem; |
4483 | 4483 | } |
4484 | 4484 |
|
4485 | 4485 | if ( one === 1 ) { |
@@ -5128,14 +5128,14 @@ var |
5128 | 5128 | rscriptTypeMasked = /^true\/(.*)/, |
5129 | 5129 | rcleanScript = /^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g; |
5130 | 5130 |
|
| 5131 | +// Manipulating tables requires a tbody |
5131 | 5132 | function manipulationTarget( elem, content ) { |
5132 | | - if ( jQuery.nodeName( elem, "table" ) && |
5133 | | - jQuery.nodeName( content.nodeType !== 11 ? content : content.firstChild, "tr" ) ) { |
| 5133 | + return jQuery.nodeName( elem, "table" ) && |
| 5134 | + jQuery.nodeName( content.nodeType !== 11 ? content : content.firstChild, "tr" ) ? |
5134 | 5135 |
|
5135 | | - return elem.getElementsByTagName( "tbody" )[ 0 ] || elem; |
5136 | | - } |
5137 | | - |
5138 | | - return elem; |
| 5136 | + elem.getElementsByTagName( "tbody" )[ 0 ] || |
| 5137 | + elem.appendChild( elem.ownerDocument.createElement( "tbody" ) ) : |
| 5138 | + elem; |
5139 | 5139 | } |
5140 | 5140 |
|
5141 | 5141 | // Replace/restore the type attribute of script elements for safe DOM manipulation |
@@ -5642,7 +5642,7 @@ var getStyles = function( elem ) { |
5642 | 5642 | // FF meanwhile throws on frame elements through "defaultView.getComputedStyle" |
5643 | 5643 | var view = elem.ownerDocument.defaultView; |
5644 | 5644 |
|
5645 | | - if ( !view.opener ) { |
| 5645 | + if ( !view || !view.opener ) { |
5646 | 5646 | view = window; |
5647 | 5647 | } |
5648 | 5648 |
|
@@ -5791,15 +5791,18 @@ function curCSS( elem, name, computed ) { |
5791 | 5791 | style = elem.style; |
5792 | 5792 |
|
5793 | 5793 | computed = computed || getStyles( elem ); |
| 5794 | + ret = computed ? computed.getPropertyValue( name ) || computed[ name ] : undefined; |
| 5795 | + |
| 5796 | + // Support: Opera 12.1x only |
| 5797 | + // Fall back to style even without computed |
| 5798 | + // computed is undefined for elems on document fragments |
| 5799 | + if ( ( ret === "" || ret === undefined ) && !jQuery.contains( elem.ownerDocument, elem ) ) { |
| 5800 | + ret = jQuery.style( elem, name ); |
| 5801 | + } |
5794 | 5802 |
|
5795 | 5803 | // Support: IE9 |
5796 | 5804 | // getPropertyValue is only needed for .css('filter') (#12537) |
5797 | 5805 | if ( computed ) { |
5798 | | - ret = computed.getPropertyValue( name ) || computed[ name ]; |
5799 | | - |
5800 | | - if ( ret === "" && !jQuery.contains( elem.ownerDocument, elem ) ) { |
5801 | | - ret = jQuery.style( elem, name ); |
5802 | | - } |
5803 | 5806 |
|
5804 | 5807 | // A tribute to the "awesome hack by Dean Edwards" |
5805 | 5808 | // Android Browser returns percentage for some values, |
@@ -7849,7 +7852,7 @@ jQuery.extend( jQuery.event, { |
7849 | 7852 | // But now, this "simulate" function is used only for events |
7850 | 7853 | // for which stopPropagation() is noop, so there is no need for that anymore. |
7851 | 7854 | // |
7852 | | - // For the compat branch though, guard for "click" and "submit" |
| 7855 | + // For the 1.x branch though, guard for "click" and "submit" |
7853 | 7856 | // events is still used, but was moved to jQuery.event.stopPropagation function |
7854 | 7857 | // because `originalEvent` should point to the original event for the constancy |
7855 | 7858 | // with other events and for more focused logic |
@@ -9619,11 +9622,8 @@ jQuery.fn.extend( { |
9619 | 9622 | } |
9620 | 9623 |
|
9621 | 9624 | // Add offsetParent borders |
9622 | | - // Subtract offsetParent scroll positions |
9623 | | - parentOffset.top += jQuery.css( offsetParent[ 0 ], "borderTopWidth", true ) - |
9624 | | - offsetParent.scrollTop(); |
9625 | | - parentOffset.left += jQuery.css( offsetParent[ 0 ], "borderLeftWidth", true ) - |
9626 | | - offsetParent.scrollLeft(); |
| 9625 | + parentOffset.top += jQuery.css( offsetParent[ 0 ], "borderTopWidth", true ); |
| 9626 | + parentOffset.left += jQuery.css( offsetParent[ 0 ], "borderLeftWidth", true ); |
9627 | 9627 | } |
9628 | 9628 |
|
9629 | 9629 | // Subtract parent offsets and element margins |
|
0 commit comments