|
|
|
@ -169,7 +169,7 @@ jQuery.fn = jQuery.prototype = {
|
|
|
|
|
return this; |
|
|
|
|
|
|
|
|
|
// HANDLE: $(#id)
|
|
|
|
|
} else { |
|
|
|
|
} |
|
|
|
|
elem = document.getElementById( match[2] ); |
|
|
|
|
|
|
|
|
|
// Check parentNode to catch when Blackberry 4.6 returns
|
|
|
|
@ -189,7 +189,7 @@ jQuery.fn = jQuery.prototype = {
|
|
|
|
|
this.context = document; |
|
|
|
|
this.selector = selector; |
|
|
|
|
return this; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// HANDLE: $(expr, $(...))
|
|
|
|
|
} else if ( !context || context.jquery ) { |
|
|
|
@ -197,9 +197,9 @@ jQuery.fn = jQuery.prototype = {
|
|
|
|
|
|
|
|
|
|
// HANDLE: $(expr, context)
|
|
|
|
|
// (which is just equivalent to: $(context).find(expr)
|
|
|
|
|
} else { |
|
|
|
|
return this.constructor( context ).find( selector ); |
|
|
|
|
} |
|
|
|
|
return this.constructor( context ).find( selector ); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// HANDLE: $(DOMElement)
|
|
|
|
|
} else if ( selector.nodeType ) { |
|
|
|
@ -1739,10 +1739,10 @@ jQuery.extend({
|
|
|
|
|
// The following elements throw uncatchable exceptions if you
|
|
|
|
|
// attempt to add expando properties to them.
|
|
|
|
|
noData: { |
|
|
|
|
"embed": true, |
|
|
|
|
embed: true, |
|
|
|
|
// Ban all objects except for Flash (which handle expandos)
|
|
|
|
|
"object": "clsid:D27CDB6E-AE6D-11cf-96B8-444553540000", |
|
|
|
|
"applet": true |
|
|
|
|
object: "clsid:D27CDB6E-AE6D-11cf-96B8-444553540000", |
|
|
|
|
applet: true |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
hasData: function ( elem ) { |
|
|
|
@ -2427,8 +2427,8 @@ jQuery.extend({
|
|
|
|
|
propFix: { |
|
|
|
|
tabindex: "tabIndex", |
|
|
|
|
readonly: "readOnly", |
|
|
|
|
"for": "htmlFor", |
|
|
|
|
"class": "className", |
|
|
|
|
for: "htmlFor", |
|
|
|
|
class: "className", |
|
|
|
|
maxlength: "maxLength", |
|
|
|
|
cellspacing: "cellSpacing", |
|
|
|
|
cellpadding: "cellPadding", |
|
|
|
@ -2460,18 +2460,18 @@ jQuery.extend({
|
|
|
|
|
if ( hooks && "set" in hooks && (ret = hooks.set( elem, value, name )) !== undefined ) { |
|
|
|
|
return ret; |
|
|
|
|
|
|
|
|
|
} else { |
|
|
|
|
return ( elem[ name ] = value ); |
|
|
|
|
} |
|
|
|
|
return ( elem[ name ] = value ); |
|
|
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
if ( hooks && "get" in hooks && (ret = hooks.get( elem, name )) !== null ) { |
|
|
|
|
return ret; |
|
|
|
|
|
|
|
|
|
} else { |
|
|
|
|
return elem[ name ]; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
return elem[ name ]; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
propHooks: { |
|
|
|
@ -3780,18 +3780,18 @@ var i,
|
|
|
|
|
ridentifier = new RegExp( "^" + identifier + "$" ), |
|
|
|
|
|
|
|
|
|
matchExpr = { |
|
|
|
|
"ID": new RegExp( "^#(" + characterEncoding + ")" ), |
|
|
|
|
"CLASS": new RegExp( "^\\.(" + characterEncoding + ")" ), |
|
|
|
|
"NAME": new RegExp( "^\\[name=['\"]?(" + characterEncoding + ")['\"]?\\]" ), |
|
|
|
|
"TAG": new RegExp( "^(" + characterEncoding.replace( "w", "w*" ) + ")" ), |
|
|
|
|
"ATTR": new RegExp( "^" + attributes ), |
|
|
|
|
"PSEUDO": new RegExp( "^" + pseudos ), |
|
|
|
|
"CHILD": new RegExp( "^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\(" + whitespace + |
|
|
|
|
ID: new RegExp( "^#(" + characterEncoding + ")" ), |
|
|
|
|
CLASS: new RegExp( "^\\.(" + characterEncoding + ")" ), |
|
|
|
|
NAME: new RegExp( "^\\[name=['\"]?(" + characterEncoding + ")['\"]?\\]" ), |
|
|
|
|
TAG: new RegExp( "^(" + characterEncoding.replace( "w", "w*" ) + ")" ), |
|
|
|
|
ATTR: new RegExp( "^" + attributes ), |
|
|
|
|
PSEUDO: new RegExp( "^" + pseudos ), |
|
|
|
|
CHILD: new RegExp( "^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\(" + whitespace + |
|
|
|
|
"*(even|odd|(([+-]|)(\\d*)n|)" + whitespace + "*(?:([+-]|)" + whitespace + |
|
|
|
|
"*(\\d+)|))" + whitespace + "*\\)|)", "i" ), |
|
|
|
|
// For use in libraries implementing .is()
|
|
|
|
|
// We use this for POS matching in `select`
|
|
|
|
|
"needsContext": new RegExp( "^" + whitespace + "*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\(" + |
|
|
|
|
needsContext: new RegExp( "^" + whitespace + "*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\(" + |
|
|
|
|
whitespace + "*((?:-\\d)?\\d*)" + whitespace + "*\\)|)(?=[^-]|$)", "i" ) |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
@ -4088,10 +4088,10 @@ setDocument = Sizzle.setDocument = function( node ) {
|
|
|
|
|
}) ? |
|
|
|
|
{} : |
|
|
|
|
{ |
|
|
|
|
"href": function( elem ) { |
|
|
|
|
href: function ( elem ) { |
|
|
|
|
return elem.getAttribute( "href", 2 ); |
|
|
|
|
}, |
|
|
|
|
"type": function( elem ) { |
|
|
|
|
type: function ( elem ) { |
|
|
|
|
return elem.getAttribute("type"); |
|
|
|
|
} |
|
|
|
|
}; |
|
|
|
@ -4525,12 +4525,12 @@ getText = Sizzle.getText = function( elem ) {
|
|
|
|
|
// innerText usage removed for consistency of new lines (see #11153)
|
|
|
|
|
if ( typeof elem.textContent === "string" ) { |
|
|
|
|
return elem.textContent; |
|
|
|
|
} else { |
|
|
|
|
} |
|
|
|
|
// Traverse its children
|
|
|
|
|
for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) { |
|
|
|
|
ret += getText( elem ); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
} else if ( nodeType === 3 || nodeType === 4 ) { |
|
|
|
|
return elem.nodeValue; |
|
|
|
|
} |
|
|
|
@ -4558,7 +4558,7 @@ Expr = Sizzle.selectors = {
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
preFilter: { |
|
|
|
|
"ATTR": function( match ) { |
|
|
|
|
ATTR: function ( match ) { |
|
|
|
|
match[1] = match[1].replace( runescape, funescape ); |
|
|
|
|
|
|
|
|
|
// Move the given value to match[3] whether quoted or unquoted
|
|
|
|
@ -4571,7 +4571,7 @@ Expr = Sizzle.selectors = {
|
|
|
|
|
return match.slice( 0, 4 ); |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
"CHILD": function( match ) { |
|
|
|
|
CHILD: function ( match ) { |
|
|
|
|
/* matches from matchExpr["CHILD"] |
|
|
|
|
1 type (only|nth|...) |
|
|
|
|
2 what (child|of-type) |
|
|
|
@ -4603,7 +4603,7 @@ Expr = Sizzle.selectors = {
|
|
|
|
|
return match; |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
"PSEUDO": function( match ) { |
|
|
|
|
PSEUDO: function ( match ) { |
|
|
|
|
var excess, |
|
|
|
|
unquoted = !match[5] && match[2]; |
|
|
|
|
|
|
|
|
@ -4634,7 +4634,7 @@ Expr = Sizzle.selectors = {
|
|
|
|
|
|
|
|
|
|
filter: { |
|
|
|
|
|
|
|
|
|
"TAG": function( nodeName ) { |
|
|
|
|
TAG: function ( nodeName ) { |
|
|
|
|
if ( nodeName === "*" ) { |
|
|
|
|
return function () { return true; }; |
|
|
|
|
} |
|
|
|
@ -4645,7 +4645,7 @@ Expr = Sizzle.selectors = {
|
|
|
|
|
}; |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
"CLASS": function( className ) { |
|
|
|
|
CLASS: function ( className ) { |
|
|
|
|
var pattern = classCache[ className + " " ]; |
|
|
|
|
|
|
|
|
|
return pattern || |
|
|
|
@ -4655,7 +4655,7 @@ Expr = Sizzle.selectors = {
|
|
|
|
|
}); |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
"ATTR": function( name, operator, check ) { |
|
|
|
|
ATTR: function ( name, operator, check ) { |
|
|
|
|
return function ( elem ) { |
|
|
|
|
var result = Sizzle.attr( elem, name ); |
|
|
|
|
|
|
|
|
@ -4679,7 +4679,7 @@ Expr = Sizzle.selectors = {
|
|
|
|
|
}; |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
"CHILD": function( type, what, argument, first, last ) { |
|
|
|
|
CHILD: function ( type, what, argument, first, last ) { |
|
|
|
|
var simple = type.slice( 0, 3 ) !== "nth", |
|
|
|
|
forward = type.slice( -4 ) !== "last", |
|
|
|
|
ofType = what === "of-type"; |
|
|
|
@ -4768,7 +4768,7 @@ Expr = Sizzle.selectors = {
|
|
|
|
|
}; |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
"PSEUDO": function( pseudo, argument ) { |
|
|
|
|
PSEUDO: function ( pseudo, argument ) { |
|
|
|
|
// pseudo-class names are case-insensitive
|
|
|
|
|
// http://www.w3.org/TR/selectors/#pseudo-classes
|
|
|
|
|
// Prioritize by case sensitivity in case custom pseudos are added with uppercase letters
|
|
|
|
@ -4808,7 +4808,7 @@ Expr = Sizzle.selectors = {
|
|
|
|
|
|
|
|
|
|
pseudos: { |
|
|
|
|
// Potentially complex pseudos
|
|
|
|
|
"not": markFunction(function( selector ) { |
|
|
|
|
not: markFunction(function ( selector ) { |
|
|
|
|
// Trim the selector passed to compile
|
|
|
|
|
// to avoid treating leading and trailing
|
|
|
|
|
// spaces as combinators
|
|
|
|
@ -4836,13 +4836,13 @@ Expr = Sizzle.selectors = {
|
|
|
|
|
}; |
|
|
|
|
}), |
|
|
|
|
|
|
|
|
|
"has": markFunction(function( selector ) { |
|
|
|
|
has: markFunction(function ( selector ) { |
|
|
|
|
return function ( elem ) { |
|
|
|
|
return Sizzle( selector, elem ).length > 0; |
|
|
|
|
}; |
|
|
|
|
}), |
|
|
|
|
|
|
|
|
|
"contains": markFunction(function( text ) { |
|
|
|
|
contains: markFunction(function ( text ) { |
|
|
|
|
return function ( elem ) { |
|
|
|
|
return ( elem.textContent || elem.innerText || getText( elem ) ).indexOf( text ) > -1; |
|
|
|
|
}; |
|
|
|
@ -4855,7 +4855,7 @@ Expr = Sizzle.selectors = {
|
|
|
|
|
// The matching of C against the element's language value is performed case-insensitively.
|
|
|
|
|
// The identifier C does not have to be a valid language name."
|
|
|
|
|
// http://www.w3.org/TR/selectors/#lang-pseudo
|
|
|
|
|
"lang": markFunction( function( lang ) { |
|
|
|
|
lang: markFunction( function ( lang ) { |
|
|
|
|
// lang value must be a valid identifider
|
|
|
|
|
if ( !ridentifier.test(lang || "") ) { |
|
|
|
|
Sizzle.error( "unsupported lang: " + lang ); |
|
|
|
@ -4877,36 +4877,36 @@ Expr = Sizzle.selectors = {
|
|
|
|
|
}), |
|
|
|
|
|
|
|
|
|
// Miscellaneous
|
|
|
|
|
"target": function( elem ) { |
|
|
|
|
target: function ( elem ) { |
|
|
|
|
var hash = window.location && window.location.hash; |
|
|
|
|
return hash && hash.slice( 1 ) === elem.id; |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
"root": function( elem ) { |
|
|
|
|
root: function ( elem ) { |
|
|
|
|
return elem === docElem; |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
"focus": function( elem ) { |
|
|
|
|
focus: function ( elem ) { |
|
|
|
|
return elem === document.activeElement && (!document.hasFocus || document.hasFocus()) && !!(elem.type || elem.href || ~elem.tabIndex); |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
// Boolean properties
|
|
|
|
|
"enabled": function( elem ) { |
|
|
|
|
enabled: function ( elem ) { |
|
|
|
|
return elem.disabled === false; |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
"disabled": function( elem ) { |
|
|
|
|
disabled: function ( elem ) { |
|
|
|
|
return elem.disabled === true; |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
"checked": function( elem ) { |
|
|
|
|
checked: function ( elem ) { |
|
|
|
|
// In CSS3, :checked should return both checked and selected elements
|
|
|
|
|
// http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked
|
|
|
|
|
var nodeName = elem.nodeName.toLowerCase(); |
|
|
|
|
return (nodeName === "input" && !!elem.checked) || (nodeName === "option" && !!elem.selected); |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
"selected": function( elem ) { |
|
|
|
|
selected: function ( elem ) { |
|
|
|
|
// Accessing this property makes selected-by-default
|
|
|
|
|
// options in Safari work properly
|
|
|
|
|
if ( elem.parentNode ) { |
|
|
|
@ -4917,7 +4917,7 @@ Expr = Sizzle.selectors = {
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
// Contents
|
|
|
|
|
"empty": function( elem ) { |
|
|
|
|
empty: function ( elem ) { |
|
|
|
|
// http://www.w3.org/TR/selectors/#empty-pseudo
|
|
|
|
|
// :empty is only affected by element nodes and content nodes(including text(3), cdata(4)),
|
|
|
|
|
// not comment, processing instructions, or others
|
|
|
|
@ -4931,25 +4931,25 @@ Expr = Sizzle.selectors = {
|
|
|
|
|
return true; |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
"parent": function( elem ) { |
|
|
|
|
parent: function ( elem ) { |
|
|
|
|
return !Expr.pseudos["empty"]( elem ); |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
// Element/input types
|
|
|
|
|
"header": function( elem ) { |
|
|
|
|
header: function ( elem ) { |
|
|
|
|
return rheader.test( elem.nodeName ); |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
"input": function( elem ) { |
|
|
|
|
input: function ( elem ) { |
|
|
|
|
return rinputs.test( elem.nodeName ); |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
"button": function( elem ) { |
|
|
|
|
button: function ( elem ) { |
|
|
|
|
var name = elem.nodeName.toLowerCase(); |
|
|
|
|
return name === "input" && elem.type === "button" || name === "button"; |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
"text": function( elem ) { |
|
|
|
|
text: function ( elem ) { |
|
|
|
|
var attr; |
|
|
|
|
// IE6 and 7 will map elem.type to 'text' for new HTML5 types (search, etc)
|
|
|
|
|
// use getAttribute instead to test this case
|
|
|
|
@ -4959,19 +4959,19 @@ Expr = Sizzle.selectors = {
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
// Position-in-collection
|
|
|
|
|
"first": createPositionalPseudo(function() { |
|
|
|
|
first: createPositionalPseudo(function () { |
|
|
|
|
return [ 0 ]; |
|
|
|
|
}), |
|
|
|
|
|
|
|
|
|
"last": createPositionalPseudo(function( matchIndexes, length ) { |
|
|
|
|
last: createPositionalPseudo(function ( matchIndexes, length ) { |
|
|
|
|
return [ length - 1 ]; |
|
|
|
|
}), |
|
|
|
|
|
|
|
|
|
"eq": createPositionalPseudo(function( matchIndexes, length, argument ) { |
|
|
|
|
eq: createPositionalPseudo(function ( matchIndexes, length, argument ) { |
|
|
|
|
return [ argument < 0 ? argument + length : argument ]; |
|
|
|
|
}), |
|
|
|
|
|
|
|
|
|
"even": createPositionalPseudo(function( matchIndexes, length ) { |
|
|
|
|
even: createPositionalPseudo(function ( matchIndexes, length ) { |
|
|
|
|
var i = 0; |
|
|
|
|
for ( ; i < length; i += 2 ) { |
|
|
|
|
matchIndexes.push( i ); |
|
|
|
@ -4979,7 +4979,7 @@ Expr = Sizzle.selectors = {
|
|
|
|
|
return matchIndexes; |
|
|
|
|
}), |
|
|
|
|
|
|
|
|
|
"odd": createPositionalPseudo(function( matchIndexes, length ) { |
|
|
|
|
odd: createPositionalPseudo(function ( matchIndexes, length ) { |
|
|
|
|
var i = 1; |
|
|
|
|
for ( ; i < length; i += 2 ) { |
|
|
|
|
matchIndexes.push( i ); |
|
|
|
@ -4987,7 +4987,7 @@ Expr = Sizzle.selectors = {
|
|
|
|
|
return matchIndexes; |
|
|
|
|
}), |
|
|
|
|
|
|
|
|
|
"lt": createPositionalPseudo(function( matchIndexes, length, argument ) { |
|
|
|
|
lt: createPositionalPseudo(function ( matchIndexes, length, argument ) { |
|
|
|
|
var i = argument < 0 ? argument + length : argument; |
|
|
|
|
for ( ; --i >= 0; ) { |
|
|
|
|
matchIndexes.push( i ); |
|
|
|
@ -4995,7 +4995,7 @@ Expr = Sizzle.selectors = {
|
|
|
|
|
return matchIndexes; |
|
|
|
|
}), |
|
|
|
|
|
|
|
|
|
"gt": createPositionalPseudo(function( matchIndexes, length, argument ) { |
|
|
|
|
gt: createPositionalPseudo(function ( matchIndexes, length, argument ) { |
|
|
|
|
var i = argument < 0 ? argument + length : argument; |
|
|
|
|
for ( ; ++i < length; ) { |
|
|
|
|
matchIndexes.push( i ); |
|
|
|
@ -5811,9 +5811,9 @@ function winnow( elements, qualifier, keep ) {
|
|
|
|
|
|
|
|
|
|
if ( isSimple.test( qualifier ) ) { |
|
|
|
|
return jQuery.filter(qualifier, filtered, !keep); |
|
|
|
|
} else { |
|
|
|
|
qualifier = jQuery.filter( qualifier, filtered ); |
|
|
|
|
} |
|
|
|
|
qualifier = jQuery.filter( qualifier, filtered ); |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
return jQuery.grep(elements, function ( elem ) { |
|
|
|
@ -6183,7 +6183,7 @@ jQuery.fn.extend({
|
|
|
|
|
dataType: "script", |
|
|
|
|
async: false, |
|
|
|
|
global: false, |
|
|
|
|
"throws": true |
|
|
|
|
throws: true |
|
|
|
|
}); |
|
|
|
|
} else { |
|
|
|
|
jQuery.globalEval( ( node.text || node.textContent || node.innerHTML || "" ).replace( rcleanScript, "" ) ); |
|
|
|
@ -6781,22 +6781,22 @@ jQuery.extend({
|
|
|
|
|
|
|
|
|
|
// Exclude the following css properties to add px
|
|
|
|
|
cssNumber: { |
|
|
|
|
"columnCount": true, |
|
|
|
|
"fillOpacity": true, |
|
|
|
|
"fontWeight": true, |
|
|
|
|
"lineHeight": true, |
|
|
|
|
"opacity": true, |
|
|
|
|
"orphans": true, |
|
|
|
|
"widows": true, |
|
|
|
|
"zIndex": true, |
|
|
|
|
"zoom": true |
|
|
|
|
columnCount: true, |
|
|
|
|
fillOpacity: true, |
|
|
|
|
fontWeight: true, |
|
|
|
|
lineHeight: true, |
|
|
|
|
opacity: true, |
|
|
|
|
orphans: true, |
|
|
|
|
widows: true, |
|
|
|
|
zIndex: true, |
|
|
|
|
zoom: true |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
// Add in properties whose names you wish to fix before
|
|
|
|
|
// setting or getting the value
|
|
|
|
|
cssProps: { |
|
|
|
|
// normalize float css property
|
|
|
|
|
"float": jQuery.support.cssFloat ? "cssFloat" : "styleFloat" |
|
|
|
|
float: jQuery.support.cssFloat ? "cssFloat" : "styleFloat" |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
// Get and set the style property on a DOM Node
|
|
|
|
@ -7227,7 +7227,7 @@ jQuery(function() {
|
|
|
|
|
if ( computed ) { |
|
|
|
|
// WebKit Bug 13343 - getComputedStyle returns wrong value for margin-right
|
|
|
|
|
// Work around by temporarily setting element display to inline-block
|
|
|
|
|
return jQuery.swap( elem, { "display": "inline-block" }, |
|
|
|
|
return jQuery.swap( elem, { display: "inline-block" }, |
|
|
|
|
curCSS, [ elem, "marginRight" ] ); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
@ -8734,10 +8734,10 @@ function Animation( elem, properties, options ) {
|
|
|
|
|
|
|
|
|
|
if ( percent < 1 && length ) { |
|
|
|
|
return remaining; |
|
|
|
|
} else { |
|
|
|
|
} |
|
|
|
|
deferred.resolveWith( elem, [ animation ] ); |
|
|
|
|
return false; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
}, |
|
|
|
|
animation = deferred.promise({ |
|
|
|
|
elem: elem, |
|
|
|
|