diff --git a/wp-includes/js/jquery/jquery.js b/wp-includes/js/jquery/jquery.js
index d008d0488a..5e3a89f608 100644
--- a/wp-includes/js/jquery/jquery.js
+++ b/wp-includes/js/jquery/jquery.js
@@ -1,13 +1,13 @@
/*!
- * jQuery JavaScript Library v1.3b2
+ * jQuery JavaScript Library v1.3rc2
* http://jquery.com/
*
* Copyright (c) 2009 John Resig
* Dual licensed under the MIT and GPL licenses.
* http://docs.jquery.com/License
*
- * Date: 2009-01-05 18:33:56 -0500 (Mon, 05 Jan 2009)
- * Revision: 6056
+ * Date: 2009-01-12 19:11:21 -0500 (Mon, 12 Jan 2009)
+ * Revision: 6100
*/
(function(){
@@ -86,6 +86,12 @@ jQuery.fn = jQuery.prototype = {
} else if ( jQuery.isFunction( selector ) )
return jQuery( document ).ready( selector );
+ // Make sure that old selector state is passed along
+ if ( selector.selector && selector.context ) {
+ this.selector = selector.selector;
+ this.context = selector.context;
+ }
+
return this.setArray(jQuery.makeArray(selector));
},
@@ -93,7 +99,7 @@ jQuery.fn = jQuery.prototype = {
selector: "",
// The current version of jQuery being used
- jquery: "1.3b2",
+ jquery: "1.3rc2",
// The number of elements contained in the matched element set
size: function() {
@@ -213,20 +219,22 @@ jQuery.fn = jQuery.prototype = {
},
wrapAll: function( html ) {
- if ( this[0] )
+ if ( this[0] ) {
// The elements to wrap the target around
- jQuery( html, this[0].ownerDocument )
- .clone()
- .insertBefore( this[0] )
- .map(function(){
- var elem = this;
+ var wrap = jQuery( html, this[0].ownerDocument ).clone();
- while ( elem.firstChild )
- elem = elem.firstChild;
+ if ( this[0].parentNode )
+ wrap.insertBefore( this[0] );
- return elem;
- })
- .append(this);
+ wrap.map(function(){
+ var elem = this;
+
+ while ( elem.firstChild )
+ elem = elem.firstChild;
+
+ return elem;
+ }).append(this);
+ }
return this;
},
@@ -273,14 +281,25 @@ jQuery.fn = jQuery.prototype = {
return this.prevObject || jQuery( [] );
},
- find: function( selector ) {
- var elems = jQuery.map(this, function(elem){
- return jQuery.find( selector, elem );
- });
+ // For internal use only.
+ // Behaves like an Array's .push method, not like a jQuery method.
+ push: [].push,
- return this.pushStack( /[^+>] [^+>]/.test( selector ) ?
- jQuery.unique( elems ) :
- elems, "find", selector );
+ find: function( selector ) {
+ if ( this.length === 1 && !/,/.test(selector) ) {
+ var ret = this.pushStack( [], "find", selector );
+ ret.length = 0;
+ jQuery.find( selector, this[0], ret );
+ return ret;
+ } else {
+ var elems = jQuery.map(this, function(elem){
+ return jQuery.find( selector, elem );
+ });
+
+ return this.pushStack( /[^+>] [^+>]/.test( selector ) ?
+ jQuery.unique( elems ) :
+ elems, "find", selector );
+ }
},
clone: function( events ) {
@@ -340,10 +359,12 @@ jQuery.fn = jQuery.prototype = {
},
closest: function( selector ) {
+ var pos = jQuery.expr.match.POS.test( selector ) ? jQuery(selector) : null;
+
return this.map(function(){
var cur = this;
while ( cur && cur.ownerDocument ) {
- if ( jQuery(cur).is(selector) )
+ if ( pos ? pos.index(cur) > -1 : jQuery(cur).is(selector) )
return cur;
cur = cur.parentNode;
}
@@ -919,8 +940,8 @@ jQuery.extend({
if ( fragment ) {
for ( var i = 0; ret[i]; i++ ) {
- if ( jQuery.nodeName( ret[i], "script" ) ) {
- scripts.push( ret[i].parentNode.removeChild( ret[i] ) );
+ if ( jQuery.nodeName( ret[i], "script" ) && (!ret[i].type || ret[i].type.toLowerCase() === "text/javascript") ) {
+ scripts.push( ret[i].parentNode ? ret[i].parentNode.removeChild( ret[i] ) : ret[i] );
} else {
if ( ret[i].nodeType === 1 )
ret.splice.apply( ret, [i + 1, 0].concat(jQuery.makeArray(ret[i].getElementsByTagName("script"))) );
@@ -955,7 +976,7 @@ jQuery.extend({
// Safari mis-reports the default selected property of a hidden option
// Accessing the parent's selectedIndex property fixes it
- if ( name == "selected" )
+ if ( name == "selected" && elem.parentNode )
elem.parentNode.selectedIndex;
// If applicable, access the attribute via the DOM 0 way
@@ -972,11 +993,15 @@ jQuery.extend({
if( jQuery.nodeName( elem, "form" ) && elem.getAttributeNode(name) )
return elem.getAttributeNode( name ).nodeValue;
- // elem.tabindex doesn't always return the correct value
+ // elem.tabIndex doesn't always return the correct value when it hasn't been explicitly set
// http://fluidproject.org/blog/2008/01/09/getting-setting-and-removing-tabindex-values-with-javascript/
- if ( name == jQuery.props.tabindex ) {
- var attributeNode = elem.getAttributeNode(jQuery.props.tabindex);
- return attributeNode && attributeNode.specified && attributeNode.value || undefined;
+ if ( name == "tabIndex" ) {
+ var attributeNode = elem.getAttributeNode( "tabIndex" );
+ return attributeNode && attributeNode.specified
+ ? attributeNode.value
+ : elem.nodeName.match(/^(a|area|button|input|object|select|textarea)$/i)
+ ? 0
+ : undefined;
}
return elem[ name ];
@@ -1138,9 +1163,6 @@ jQuery.browser = {
mozilla: /mozilla/.test( userAgent ) && !/(compatible|webkit)/.test( userAgent )
};
-// Check to see if the W3C box model is being used
-jQuery.boxModel = !jQuery.browser.msie || document.compatMode == "CSS1Compat";
-
jQuery.each({
parent: function(elem){return elem.parentNode;},
parents: function(elem){return jQuery.dir(elem,"parentNode");},
@@ -1374,124 +1396,19 @@ jQuery.fn.extend({
jQuery.dequeue( this, type );
});
}
-});(function(){
-
- jQuery.support = {};
-
- var root = document.documentElement,
- script = document.createElement("script"),
- div = document.createElement("div"),
- id = "script" + (new Date).getTime();
-
- div.style.display = "none";
- div.innerHTML = '
a';
-
- var all = div.getElementsByTagName("*"),
- a = div.getElementsByTagName("a")[0];
-
- // Can't get basic test support
- if ( !all || !all.length || !a ) {
- return;
- }
-
- jQuery.support = {
- // IE strips leading whitespace when .innerHTML is used
- leadingWhitespace: div.firstChild.nodeType == 3,
-
- // Make sure that tbody elements aren't automatically inserted
- // IE will insert them into empty tables
- tbody: !div.getElementsByTagName("tbody").length,
-
- // Make sure that you can get all elements in an