aboutsummaryrefslogtreecommitdiffstats
path: root/src/manipulation.js
diff options
context:
space:
mode:
authorjeresig <jeresig@gmail.com>2010-12-09 12:44:30 -0500
committerjeresig <jeresig@gmail.com>2010-12-09 12:44:30 -0500
commitcec68e2b00d86357c18b576cbaed52cc1ea42a74 (patch)
tree7ec54b0c5c9d923de1526833fdfd57d326f505af /src/manipulation.js
parentb2ea79c401588f9108b99c748699426063649143 (diff)
parente4900df8389c85350d1d82c827fab0d4b91989d6 (diff)
downloadjquery-cec68e2b00d86357c18b576cbaed52cc1ea42a74.tar.gz
jquery-cec68e2b00d86357c18b576cbaed52cc1ea42a74.zip
Merge branch 'bug5566' of https://github.com/csnover/jquery into csnover-bug5566
Diffstat (limited to 'src/manipulation.js')
-rw-r--r--src/manipulation.js32
1 files changed, 16 insertions, 16 deletions
diff --git a/src/manipulation.js b/src/manipulation.js
index e09dd7eb4..8d951b648 100644
--- a/src/manipulation.js
+++ b/src/manipulation.js
@@ -151,7 +151,7 @@ jQuery.fn.extend({
return set;
}
},
-
+
// keepData is for internal use only--do not document
remove: function( selector, keepData ) {
for ( var i = 0, elem; (elem = this[i]) != null; i++ ) {
@@ -166,7 +166,7 @@ jQuery.fn.extend({
}
}
}
-
+
return this;
},
@@ -182,7 +182,7 @@ jQuery.fn.extend({
elem.removeChild( elem.firstChild );
}
}
-
+
return this;
},
@@ -334,9 +334,9 @@ jQuery.fn.extend({
} else {
results = jQuery.buildFragment( args, this, scripts );
}
-
+
fragment = results.fragment;
-
+
if ( fragment.childNodes.length === 1 ) {
first = fragment = fragment.firstChild;
} else {
@@ -352,7 +352,7 @@ jQuery.fn.extend({
root(this[i], first) :
this[i],
i > 0 || results.cacheable || this.length > 1 ?
- fragment.cloneNode(true) :
+ jQuery(fragment).clone(true)[0] :
fragment
);
}
@@ -444,18 +444,18 @@ jQuery.each({
var ret = [],
insert = jQuery( selector ),
parent = this.length === 1 && this[0].parentNode;
-
+
if ( parent && parent.nodeType === 11 && parent.childNodes.length === 1 && insert.length === 1 ) {
insert[ original ]( this[0] );
return this;
-
+
} else {
for ( var i = 0, l = insert.length; i < l; i++ ) {
var elems = (i > 0 ? this.clone(true) : this).get();
jQuery( insert[i] )[ original ]( elems );
ret = ret.concat( elems );
}
-
+
return this.pushStack( ret, name, insert.selector );
}
};
@@ -543,7 +543,7 @@ jQuery.extend({
for ( i = 0; ret[i]; i++ ) {
if ( scripts && 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"))) );
@@ -555,22 +555,22 @@ jQuery.extend({
return ret;
},
-
+
cleanData: function( elems ) {
var data, id, cache = jQuery.cache,
special = jQuery.event.special,
deleteExpando = jQuery.support.deleteExpando;
-
+
for ( var i = 0, elem; (elem = elems[i]) != null; i++ ) {
if ( elem.nodeName && jQuery.noData[elem.nodeName.toLowerCase()] ) {
continue;
}
id = elem[ jQuery.expando ];
-
+
if ( id ) {
data = cache[ id ];
-
+
if ( data && data.events ) {
for ( var type in data.events ) {
if ( special[ type ] ) {
@@ -581,14 +581,14 @@ jQuery.extend({
}
}
}
-
+
if ( deleteExpando ) {
delete elem[ jQuery.expando ];
} else if ( elem.removeAttribute ) {
elem.removeAttribute( jQuery.expando );
}
-
+
delete cache[ id ];
}
}