vendor/assets/javascripts/jquery.js in jquery-cdn-1.12.0 vs vendor/assets/javascripts/jquery.js in jquery-cdn-1.12.2
- old
+ new
@@ -1,17 +1,17 @@
/*!
- * jQuery JavaScript Library v1.12.0
+ * jQuery JavaScript Library v1.12.2
* http://jquery.com/
*
* Includes Sizzle.js
* http://sizzlejs.com/
*
* Copyright jQuery Foundation and other contributors
* Released under the MIT license
* http://jquery.org/license
*
- * Date: 2016-01-08T19:56Z
+ * Date: 2016-03-17T17:44Z
*/
(function( global, factory ) {
if ( typeof module === "object" && typeof module.exports === "object" ) {
@@ -63,11 +63,11 @@
var support = {};
var
- version = "1.12.0",
+ version = "1.12.2",
// Define a local copy of jQuery
jQuery = function( selector, context ) {
// The jQuery object is actually just the init constructor 'enhanced'
@@ -3623,15 +3623,14 @@
readyList = jQuery.Deferred();
// Catch cases where $(document).ready() is called
// after the browser event has already occurred.
- // we once tried to use readyState "interactive" here,
- // but it caused issues like the one
- // discovered by ChrisS here:
- // http://bugs.jquery.com/ticket/12282#comment:15
- if ( document.readyState === "complete" ) {
+ // Support: IE6-10
+ // Older IE sometimes signals "interactive" too soon
+ if ( document.readyState === "complete" ||
+ ( document.readyState !== "loading" && !document.documentElement.doScroll ) ) {
// Handle it asynchronously to allow scripts the opportunity to delay ready
window.setTimeout( jQuery.ready );
// Standards-based browsers support DOMContentLoaded
@@ -6699,11 +6698,11 @@
// Support: IE<=11+, Firefox<=30+ (#15098, #14150)
// IE throws on elements created in popups
// FF meanwhile throws on frame elements through "defaultView.getComputedStyle"
var view = elem.ownerDocument.defaultView;
- if ( !view.opener ) {
+ if ( !view || !view.opener ) {
view = window;
}
return view.getComputedStyle( elem );
};
@@ -6715,16 +6714,19 @@
computed = computed || getStyles( elem );
// getPropertyValue is only needed for .css('filter') in IE9, see #12537
ret = computed ? computed.getPropertyValue( name ) || computed[ name ] : undefined;
+ // Support: Opera 12.1x only
+ // Fall back to style even without computed
+ // computed is undefined for elems on document fragments
+ if ( ( ret === "" || ret === undefined ) && !jQuery.contains( elem.ownerDocument, elem ) ) {
+ ret = jQuery.style( elem, name );
+ }
+
if ( computed ) {
- if ( ret === "" && !jQuery.contains( elem.ownerDocument, elem ) ) {
- ret = jQuery.style( elem, name );
- }
-
// A tribute to the "awesome hack by Dean Edwards"
// Chrome < 17 and Safari 5.0 uses "computed value"
// instead of "used value" for margin-right
// Safari 5.1.7 (at least) returns percentage for a larger set of values,
// but width seems to be reliably pixels
@@ -8194,11 +8196,12 @@
input.setAttribute( "type", "radio" );
support.radioValue = input.value === "t";
} )();
-var rreturn = /\r/g;
+var rreturn = /\r/g,
+ rspaces = /[\x20\t\r\n\f]+/g;
jQuery.fn.extend( {
val: function( value ) {
var hooks, ret, isFunction,
elem = this[ 0 ];
@@ -8274,11 +8277,13 @@
return val != null ?
val :
// Support: IE10-11+
// option.text throws exceptions (#14686, #14858)
- jQuery.trim( jQuery.text( elem ) );
+ // Strip and collapse whitespace
+ // https://html.spec.whatwg.org/#strip-and-collapse-whitespace
+ jQuery.trim( jQuery.text( elem ) ).replace( rspaces, " " );
}
},
select: {
get: function( elem ) {
var value, option,
@@ -8328,11 +8333,11 @@
i = options.length;
while ( i-- ) {
option = options[ i ];
- if ( jQuery.inArray( jQuery.valHooks.option.get( option ), values ) >= 0 ) {
+ if ( jQuery.inArray( jQuery.valHooks.option.get( option ), values ) > -1 ) {
// Support: IE6
// When new option element is added to select box we need to
// force reflow of newly added node in order to workaround delay
// of initialization properties
@@ -8747,12 +8752,15 @@
};
} );
}
// Support: Safari, IE9+
-// mis-reports the default selected property of an option
-// Accessing the parent's selectedIndex property fixes it
+// Accessing the selectedIndex property
+// forces the browser to respect setting selected
+// on the option
+// The getter ensures a default option is selected
+// when in an optgroup
if ( !support.optSelected ) {
jQuery.propHooks.selected = {
get: function( elem ) {
var parent = elem.parentNode;
@@ -8763,10 +8771,20 @@
if ( parent.parentNode ) {
parent.parentNode.selectedIndex;
}
}
return null;
+ },
+ set: function( elem ) {
+ var parent = elem.parentNode;
+ if ( parent ) {
+ parent.selectedIndex;
+
+ if ( parent.parentNode ) {
+ parent.parentNode.selectedIndex;
+ }
+ }
}
};
}
jQuery.each( [
@@ -10538,25 +10556,10 @@
} );
-// Support: Safari 8+
-// In Safari 8 documents created via document.implementation.createHTMLDocument
-// collapse sibling forms: the second one becomes a child of the first one.
-// Because of that, this security measure has to be disabled in Safari 8.
-// https://bugs.webkit.org/show_bug.cgi?id=137337
-support.createHTMLDocument = ( function() {
- if ( !document.implementation.createHTMLDocument ) {
- return false;
- }
- var doc = document.implementation.createHTMLDocument( "" );
- doc.body.innerHTML = "<form></form><form></form>";
- return doc.body.childNodes.length === 2;
-} )();
-
-
// data: string of html
// context (optional): If specified, the fragment will be created in this context,
// defaults to document
// keepScripts (optional): If true, will include scripts passed in the html string
jQuery.parseHTML = function( data, context, keepScripts ) {
@@ -10565,17 +10568,12 @@
}
if ( typeof context === "boolean" ) {
keepScripts = context;
context = false;
}
+ context = context || document;
- // document.implementation stops scripts or inline event handlers from
- // being executed immediately
- context = context || ( support.createHTMLDocument ?
- document.implementation.createHTMLDocument( "" ) :
- document );
-
var parsed = rsingleTag.exec( data ),
scripts = !keepScripts && [];
// Single tag
if ( parsed ) {
@@ -10816,14 +10814,11 @@
if ( !jQuery.nodeName( offsetParent[ 0 ], "html" ) ) {
parentOffset = offsetParent.offset();
}
// Add offsetParent borders
- // Subtract offsetParent scroll positions
- parentOffset.top += jQuery.css( offsetParent[ 0 ], "borderTopWidth", true ) -
- offsetParent.scrollTop();
- parentOffset.left += jQuery.css( offsetParent[ 0 ], "borderLeftWidth", true ) -
- offsetParent.scrollLeft();
+ parentOffset.top += jQuery.css( offsetParent[ 0 ], "borderTopWidth", true );
+ parentOffset.left += jQuery.css( offsetParent[ 0 ], "borderLeftWidth", true );
}
// Subtract parent offsets and element margins
// note: when an element has margin: auto the offsetLeft and marginLeft
// are the same in Safari causing offset.left to incorrectly be 0