/*!
- * jQuery JavaScript Library v1.8.2
+ * jQuery JavaScript Library v1.8.3
* http://jquery.com/
*
* Includes Sizzle.js
* Released under the MIT license
* http://jquery.org/license
*
- * Date: Thu Sep 20 2012 21:13:05 GMT-0400 (Eastern Daylight Time)
+ * Date: Tue Nov 13 2012 08:20:33 GMT-0500 (Eastern Standard Time)
*/
(function( window, undefined ) {
var
selector: "",
// The current version of jQuery being used
- jquery: "1.8.2",
+ jquery: "1.8.3",
// The default length of a jQuery object is 0
length: 0,
(function add( args ) {
jQuery.each( args, function( _, arg ) {
var type = jQuery.type( arg );
- if ( type === "function" && ( !options.unique || !self.has( arg ) ) ) {
- list.push( arg );
+ if ( type === "function" ) {
+ if ( !options.unique || !self.has( arg ) ) {
+ list.push( arg );
+ }
} else if ( arg && arg.length && type !== "string" ) {
// Inspect recursively
add( arg );
clickFn,
div = document.createElement("div");
- // Preliminary tests
+ // Setup
div.setAttribute( "className", "t" );
div.innerHTML = " <link/><table></table><a href='/a'>a</a><input type='checkbox'/>";
+ // Support tests won't run in some limited or non-browser environments
all = div.getElementsByTagName("*");
a = div.getElementsByTagName("a")[ 0 ];
- a.style.cssText = "top:1px;float:left;opacity:.5";
-
- // Can't get basic test support
- if ( !all || !all.length ) {
+ if ( !all || !a || !all.length ) {
return {};
}
- // First batch of supports tests
+ // First batch of tests
select = document.createElement("select");
opt = select.appendChild( document.createElement("option") );
input = div.getElementsByTagName("input")[ 0 ];
+ a.style.cssText = "top:1px;float:left;opacity:.5";
support = {
// IE strips leading whitespace when .innerHTML is used
leadingWhitespace: ( div.firstChild.nodeType === 3 ),
// Test setAttribute on camelCase class. If it works, we need attrFixes when doing get/setAttribute (ie6/7)
getSetAttribute: div.className !== "t",
- // Tests for enctype support on a form(#6743)
+ // Tests for enctype support on a form (#6743)
enctype: !!document.createElement("form").enctype,
// Makes sure cloning an html5 element does not cause problems
},
select: {
get: function( elem ) {
- var value, i, max, option,
- index = elem.selectedIndex,
- values = [],
+ var value, option,
options = elem.options,
- one = elem.type === "select-one";
-
- // Nothing was selected
- if ( index < 0 ) {
- return null;
- }
+ index = elem.selectedIndex,
+ one = elem.type === "select-one" || index < 0,
+ values = one ? null : [],
+ max = one ? index + 1 : options.length,
+ i = index < 0 ?
+ max :
+ one ? index : 0;
// Loop through all the selected options
- i = one ? index : 0;
- max = one ? index + 1 : options.length;
for ( ; i < max; i++ ) {
option = options[ i ];
- // Don't return options that are disabled or in a disabled optgroup
- if ( option.selected && (jQuery.support.optDisabled ? !option.disabled : option.getAttribute("disabled") === null) &&
- (!option.parentNode.disabled || !jQuery.nodeName( option.parentNode, "optgroup" )) ) {
+ // oldIE doesn't update selected after form reset (#2551)
+ if ( ( option.selected || i === index ) &&
+ // Don't return options that are disabled or in a disabled optgroup
+ ( jQuery.support.optDisabled ? !option.disabled : option.getAttribute("disabled") === null ) &&
+ ( !option.parentNode.disabled || !jQuery.nodeName( option.parentNode, "optgroup" ) ) ) {
// Get the specific value for the option
value = jQuery( option ).val();
}
}
- // Fixes Bug #2551 -- select.val() broken in IE after form.reset()
- if ( one && !values.length && options.length ) {
- return jQuery( options[ index ] ).val();
- }
-
return values;
},
if ( elem.detachEvent ) {
- // #8545, #7054, preventing memory leaks for custom events in IE6-8 –
+ // #8545, #7054, preventing memory leaks for custom events in IE6-8
// detachEvent needed property on element, by name of that event, to properly expose it to GC
if ( typeof elem[ name ] === "undefined" ) {
elem[ name ] = null;
delete cache[ keys.shift() ];\r
}\r
\r
- return (cache[ key ] = value);\r
+ // Retrieve with (key + " ") to avoid collision with native Object.prototype properties (see Issue #157)\r
+ return (cache[ key + " " ] = value);\r
}, cache );\r
},\r
\r
},\r
\r
"CLASS": function( className ) {\r
- var pattern = classCache[ expando ][ className ];\r
- if ( !pattern ) {\r
- pattern = classCache( className, new RegExp("(^|" + whitespace + ")" + className + "(" + whitespace + "|$)") );\r
- }\r
- return function( elem ) {\r
- return pattern.test( elem.className || (typeof elem.getAttribute !== strundefined && elem.getAttribute("class")) || "" );\r
- };\r
+ var pattern = classCache[ expando ][ className + " " ];\r
+\r
+ return pattern ||\r
+ (pattern = new RegExp( "(^|" + whitespace + ")" + className + "(" + whitespace + "|$)" )) &&\r
+ classCache( className, function( elem ) {\r
+ return pattern.test( elem.className || (typeof elem.getAttribute !== strundefined && elem.getAttribute("class")) || "" );\r
+ });\r
},\r
\r
"ATTR": function( name, operator, check ) {\r
\r
"focus": function( elem ) {\r
var doc = elem.ownerDocument;\r
- return elem === doc.activeElement && (!doc.hasFocus || doc.hasFocus()) && !!(elem.type || elem.href);\r
+ return elem === doc.activeElement && (!doc.hasFocus || doc.hasFocus()) && !!(elem.type || elem.href || ~elem.tabIndex);\r
},\r
\r
"active": function( elem ) {\r
},\r
\r
// Positional types\r
- "first": createPositionalPseudo(function( matchIndexes, length, argument ) {\r
+ "first": createPositionalPseudo(function() {\r
return [ 0 ];\r
}),\r
\r
- "last": createPositionalPseudo(function( matchIndexes, length, argument ) {\r
+ "last": createPositionalPseudo(function( matchIndexes, length ) {\r
return [ length - 1 ];\r
}),\r
\r
return [ argument < 0 ? argument + length : argument ];\r
}),\r
\r
- "even": createPositionalPseudo(function( matchIndexes, length, argument ) {\r
+ "even": createPositionalPseudo(function( matchIndexes, length ) {\r
for ( var i = 0; i < length; i += 2 ) {\r
matchIndexes.push( i );\r
}\r
return matchIndexes;\r
}),\r
\r
- "odd": createPositionalPseudo(function( matchIndexes, length, argument ) {\r
+ "odd": createPositionalPseudo(function( matchIndexes, length ) {\r
for ( var i = 1; i < length; i += 2 ) {\r
matchIndexes.push( i );\r
}\r
// Document sorting and removing duplicates\r
Sizzle.uniqueSort = function( results ) {\r
var elem,\r
- i = 1;\r
+ duplicates = [],\r
+ i = 1,\r
+ j = 0;\r
\r
hasDuplicate = baseHasDuplicate;\r
results.sort( sortOrder );\r
if ( hasDuplicate ) {\r
for ( ; (elem = results[i]); i++ ) {\r
if ( elem === results[ i - 1 ] ) {\r
- results.splice( i--, 1 );\r
+ j = duplicates.push( i );\r
}\r
}\r
+ while ( j-- ) {\r
+ results.splice( duplicates[ j ], 1 );\r
+ }\r
}\r
\r
return results;\r
};\r
\r
function tokenize( selector, parseOnly ) {\r
- var matched, match, tokens, type, soFar, groups, preFilters,\r
- cached = tokenCache[ expando ][ selector ];\r
+ var matched, match, tokens, type,\r
+ soFar, groups, preFilters,\r
+ cached = tokenCache[ expando ][ selector + " " ];\r
\r
if ( cached ) {\r
return parseOnly ? 0 : cached.slice( 0 );\r
// Comma and first run\r
if ( !matched || (match = rcomma.exec( soFar )) ) {\r
if ( match ) {\r
- soFar = soFar.slice( match[0].length );\r
+ // Don't consume trailing commas as valid\r
+ soFar = soFar.slice( match[0].length ) || soFar;\r
}\r
groups.push( tokens = [] );\r
}\r
// Filters\r
for ( type in Expr.filter ) {\r
if ( (match = matchExpr[ type ].exec( soFar )) && (!preFilters[ type ] ||\r
- // The last two arguments here are (context, xml) for backCompat\r
- (match = preFilters[ type ]( match, document, true ))) ) {\r
+ (match = preFilters[ type ]( match ))) ) {\r
\r
tokens.push( matched = new Token( match.shift() ) );\r
soFar = soFar.slice( matched.length );\r
postFinder = setMatcher( postFinder, postSelector );\r
}\r
return markFunction(function( seed, results, context, xml ) {\r
- // Positional selectors apply to seed elements, so it is invalid to follow them with relative ones\r
- if ( seed && postFinder ) {\r
- return;\r
- }\r
-\r
- var i, elem, postFilterIn,\r
+ var temp, i, elem,\r
preMap = [],\r
postMap = [],\r
preexisting = results.length,\r
\r
// Get initial elements from seed or context\r
- elems = seed || multipleContexts( selector || "*", context.nodeType ? [ context ] : context, [], seed ),\r
+ elems = seed || multipleContexts( selector || "*", context.nodeType ? [ context ] : context, [] ),\r
\r
// Prefilter to get matcher input, preserving a map for seed-results synchronization\r
matcherIn = preFilter && ( seed || !selector ) ?\r
\r
// Apply postFilter\r
if ( postFilter ) {\r
- postFilterIn = condense( matcherOut, postMap );\r
- postFilter( postFilterIn, [], context, xml );\r
+ temp = condense( matcherOut, postMap );\r
+ postFilter( temp, [], context, xml );\r
\r
// Un-match failing elements by moving them back to matcherIn\r
- i = postFilterIn.length;\r
+ i = temp.length;\r
while ( i-- ) {\r
- if ( (elem = postFilterIn[i]) ) {\r
+ if ( (elem = temp[i]) ) {\r
matcherOut[ postMap[i] ] = !(matcherIn[ postMap[i] ] = elem);\r
}\r
}\r
}\r
\r
- // Keep seed and results synchronized\r
if ( seed ) {\r
- // Ignore postFinder because it can't coexist with seed\r
- i = preFilter && matcherOut.length;\r
- while ( i-- ) {\r
- if ( (elem = matcherOut[i]) ) {\r
- seed[ preMap[i] ] = !(results[ preMap[i] ] = elem);\r
+ if ( postFinder || preFilter ) {\r
+ if ( postFinder ) {\r
+ // Get the final matcherOut by condensing this intermediate into postFinder contexts\r
+ temp = [];\r
+ i = matcherOut.length;\r
+ while ( i-- ) {\r
+ if ( (elem = matcherOut[i]) ) {\r
+ // Restore matcherIn since elem is not yet a final match\r
+ temp.push( (matcherIn[i] = elem) );\r
+ }\r
+ }\r
+ postFinder( null, (matcherOut = []), temp, xml );\r
+ }\r
+\r
+ // Move matched elements from seed to results to keep them synchronized\r
+ i = matcherOut.length;\r
+ while ( i-- ) {\r
+ if ( (elem = matcherOut[i]) &&\r
+ (temp = postFinder ? indexOf.call( seed, elem ) : preMap[i]) > -1 ) {\r
+\r
+ seed[temp] = !(results[temp] = elem);\r
+ }\r
}\r
}\r
+\r
+ // Add elements to results, through postFinder if defined\r
} else {\r
matcherOut = condense(\r
matcherOut === results ?\r
if ( (matcher = Expr.relative[ tokens[i].type ]) ) {\r
matchers = [ addCombinator( elementMatcher( matchers ), matcher ) ];\r
} else {\r
- // The concatenated values are (context, xml) for backCompat\r
matcher = Expr.filter[ tokens[i].type ].apply( null, tokens[i].matches );\r
\r
// Return special upon seeing a positional matcher\r
var i,\r
setMatchers = [],\r
elementMatchers = [],\r
- cached = compilerCache[ expando ][ selector ];\r
+ cached = compilerCache[ expando ][ selector + " " ];\r
\r
if ( !cached ) {\r
// Generate a function of recursive functions that can be used to check each element\r
return cached;\r
};\r
\r
-function multipleContexts( selector, contexts, results, seed ) {\r
+function multipleContexts( selector, contexts, results ) {\r
var i = 0,\r
len = contexts.length;\r
for ( ; i < len; i++ ) {\r
- Sizzle( selector, contexts[i], results, seed );\r
+ Sizzle( selector, contexts[i], results );\r
}\r
return results;\r
}\r
rescape = /'|\\/g,\r
rattributeQuotes = /\=[\x20\t\r\n\f]*([^'"\]]*)[\x20\t\r\n\f]*\]/g,\r
\r
- // qSa(:focus) reports false when true (Chrome 21),\r
+ // qSa(:focus) reports false when true (Chrome 21), no need to also add to buggyMatches since matches checks buggyQSA\r
// A support test would require too much code (would include document ready)\r
- rbuggyQSA = [":focus"],\r
+ rbuggyQSA = [ ":focus" ],\r
\r
- // matchesSelector(:focus) reports false when true (Chrome 21),\r
// matchesSelector(:active) reports false when true (IE9/Opera 11.5)\r
// A support test would require too much code (would include document ready)\r
// just skip matchesSelector for :active\r
- rbuggyMatches = [ ":active", ":focus" ],\r
+ rbuggyMatches = [ ":active" ],\r
matches = docElem.matchesSelector ||\r
docElem.mozMatchesSelector ||\r
docElem.webkitMatchesSelector ||\r
// Only use querySelectorAll when not filtering,\r
// when this is not xml,\r
// and when no QSA bugs apply\r
- if ( !seed && !xml && (!rbuggyQSA || !rbuggyQSA.test( selector )) ) {\r
+ if ( !seed && !xml && !rbuggyQSA.test( selector ) ) {\r
var groups, i,\r
old = true,\r
nid = expando,\r
expr = expr.replace( rattributeQuotes, "='$1']" );\r
\r
// rbuggyMatches always contains :active, so no need for an existence check\r
- if ( !isXML( elem ) && !rbuggyMatches.test( expr ) && (!rbuggyQSA || !rbuggyQSA.test( expr )) ) {\r
+ if ( !isXML( elem ) && !rbuggyMatches.test( expr ) && !rbuggyQSA.test( expr ) ) {\r
try {\r
var ret = matches.call( elem, expr );\r
\r
rnumsplit = new RegExp( "^(" + core_pnum + ")(.*)$", "i" ),
rnumnonpx = new RegExp( "^(" + core_pnum + ")(?!px)[a-z%]+$", "i" ),
rrelNum = new RegExp( "^([-+])=(" + core_pnum + ")", "i" ),
- elemdisplay = {},
+ elemdisplay = { BODY: "block" },
cssShow = { position: "absolute", visibility: "hidden", display: "block" },
cssNormalTransform = {
if ( computed ) {
- ret = computed[ name ];
+ // getPropertyValue is only needed for .css('filter') in IE9, see #12537
+ ret = computed.getPropertyValue( name ) || computed[ name ];
+
if ( ret === "" && !jQuery.contains( elem.ownerDocument, elem ) ) {
ret = jQuery.style( elem, name );
}
// A cross-domain request is in order when we have a protocol:host:port mismatch
if ( s.crossDomain == null ) {
- parts = rurl.exec( s.url.toLowerCase() ) || false;
- s.crossDomain = parts && ( parts.join(":") + ( parts[ 3 ] ? "" : parts[ 1 ] === "http:" ? 80 : 443 ) ) !==
- ( ajaxLocParts.join(":") + ( ajaxLocParts[ 3 ] ? "" : ajaxLocParts[ 1 ] === "http:" ? 80 : 443 ) );
+ parts = rurl.exec( s.url.toLowerCase() );
+ s.crossDomain = !!( parts &&
+ ( parts[ 1 ] !== ajaxLocParts[ 1 ] || parts[ 2 ] !== ajaxLocParts[ 2 ] ||
+ ( parts[ 3 ] || ( parts[ 1 ] === "http:" ? 80 : 443 ) ) !=
+ ( ajaxLocParts[ 3 ] || ( ajaxLocParts[ 1 ] === "http:" ? 80 : 443 ) ) )
+ );
}
// Convert data if not already a string
// on any attempt to access responseText (#11426)
try {
responses.text = xhr.responseText;
- } catch( _ ) {
+ } catch( e ) {
}
// Firefox throws an exception when accessing
tick = function() {
var currentTime = fxNow || createFxNow(),
remaining = Math.max( 0, animation.startTime + animation.duration - currentTime ),
- percent = 1 - ( remaining / animation.duration || 0 ),
+ // archaic crash bug won't allow us to use 1 - ( 0.5 || 0 ) (#12497)
+ temp = remaining / animation.duration || 0,
+ percent = 1 - temp,
index = 0,
length = animation.tweens.length;
});
function defaultPrefilter( elem, props, opts ) {
- var index, prop, value, length, dataShow, tween, hooks, oldfire,
+ var index, prop, value, length, dataShow, toggle, tween, hooks, oldfire,
anim = this,
style = elem.style,
orig = {},
value = props[ index ];
if ( rfxtypes.exec( value ) ) {
delete props[ index ];
+ toggle = toggle || value === "toggle";
if ( value === ( hidden ? "hide" : "show" ) ) {
continue;
}
length = handled.length;
if ( length ) {
dataShow = jQuery._data( elem, "fxshow" ) || jQuery._data( elem, "fxshow", {} );
+ if ( "hidden" in dataShow ) {
+ hidden = dataShow.hidden;
+ }
+
+ // store state if its toggle - enables .stop().toggle() to "reverse"
+ if ( toggle ) {
+ dataShow.hidden = !hidden;
+ }
if ( hidden ) {
jQuery( elem ).show();
} else {
timers = jQuery.timers,
i = 0;
+ fxNow = jQuery.now();
+
for ( ; i < timers.length; i++ ) {
timer = timers[ i ];
// Checks the timer has not already been removed
if ( !timers.length ) {
jQuery.fx.stop();
}
+ fxNow = undefined;
};
jQuery.fx.timer = function( timer ) {