mirror of
https://github.com/jquery/jquery.git
synced 2024-11-23 02:54:22 +00:00
Clean up empty lines with whitespace in manipulation.js
This commit is contained in:
parent
e1d6edf822
commit
c8be9461ee
@ -149,7 +149,7 @@ jQuery.fn.extend({
|
|||||||
return set;
|
return set;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
// keepData is for internal use only--do not document
|
// keepData is for internal use only--do not document
|
||||||
remove: function( selector, keepData ) {
|
remove: function( selector, keepData ) {
|
||||||
for ( var i = 0, elem; (elem = this[i]) != null; i++ ) {
|
for ( var i = 0, elem; (elem = this[i]) != null; i++ ) {
|
||||||
@ -164,7 +164,7 @@ jQuery.fn.extend({
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return this;
|
return this;
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -180,7 +180,7 @@ jQuery.fn.extend({
|
|||||||
elem.removeChild( elem.firstChild );
|
elem.removeChild( elem.firstChild );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return this;
|
return this;
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -331,9 +331,9 @@ jQuery.fn.extend({
|
|||||||
} else {
|
} else {
|
||||||
results = jQuery.buildFragment( args, this, scripts );
|
results = jQuery.buildFragment( args, this, scripts );
|
||||||
}
|
}
|
||||||
|
|
||||||
fragment = results.fragment;
|
fragment = results.fragment;
|
||||||
|
|
||||||
if ( fragment.childNodes.length === 1 ) {
|
if ( fragment.childNodes.length === 1 ) {
|
||||||
first = fragment = fragment.firstChild;
|
first = fragment = fragment.firstChild;
|
||||||
} else {
|
} else {
|
||||||
@ -441,18 +441,18 @@ jQuery.each({
|
|||||||
var ret = [],
|
var ret = [],
|
||||||
insert = jQuery( selector ),
|
insert = jQuery( selector ),
|
||||||
parent = this.length === 1 && this[0].parentNode;
|
parent = this.length === 1 && this[0].parentNode;
|
||||||
|
|
||||||
if ( parent && parent.nodeType === 11 && parent.childNodes.length === 1 && insert.length === 1 ) {
|
if ( parent && parent.nodeType === 11 && parent.childNodes.length === 1 && insert.length === 1 ) {
|
||||||
insert[ original ]( this[0] );
|
insert[ original ]( this[0] );
|
||||||
return this;
|
return this;
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
for ( var i = 0, l = insert.length; i < l; i++ ) {
|
for ( var i = 0, l = insert.length; i < l; i++ ) {
|
||||||
var elems = (i > 0 ? this.clone(true) : this).get();
|
var elems = (i > 0 ? this.clone(true) : this).get();
|
||||||
jQuery( insert[i] )[ original ]( elems );
|
jQuery( insert[i] )[ original ]( elems );
|
||||||
ret = ret.concat( elems );
|
ret = ret.concat( elems );
|
||||||
}
|
}
|
||||||
|
|
||||||
return this.pushStack( ret, name, insert.selector );
|
return this.pushStack( ret, name, insert.selector );
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@ -540,7 +540,7 @@ jQuery.extend({
|
|||||||
for ( i = 0; ret[i]; i++ ) {
|
for ( i = 0; ret[i]; i++ ) {
|
||||||
if ( scripts && jQuery.nodeName( ret[i], "script" ) && (!ret[i].type || ret[i].type.toLowerCase() === "text/javascript") ) {
|
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] );
|
scripts.push( ret[i].parentNode ? ret[i].parentNode.removeChild( ret[i] ) : ret[i] );
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
if ( ret[i].nodeType === 1 ) {
|
if ( ret[i].nodeType === 1 ) {
|
||||||
ret.splice.apply( ret, [i + 1, 0].concat(jQuery.makeArray(ret[i].getElementsByTagName("script"))) );
|
ret.splice.apply( ret, [i + 1, 0].concat(jQuery.makeArray(ret[i].getElementsByTagName("script"))) );
|
||||||
@ -552,22 +552,22 @@ jQuery.extend({
|
|||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
},
|
},
|
||||||
|
|
||||||
cleanData: function( elems ) {
|
cleanData: function( elems ) {
|
||||||
var data, id, cache = jQuery.cache,
|
var data, id, cache = jQuery.cache,
|
||||||
special = jQuery.event.special,
|
special = jQuery.event.special,
|
||||||
deleteExpando = jQuery.support.deleteExpando;
|
deleteExpando = jQuery.support.deleteExpando;
|
||||||
|
|
||||||
for ( var i = 0, elem; (elem = elems[i]) != null; i++ ) {
|
for ( var i = 0, elem; (elem = elems[i]) != null; i++ ) {
|
||||||
if ( elem.nodeName && jQuery.noData[elem.nodeName.toLowerCase()] ) {
|
if ( elem.nodeName && jQuery.noData[elem.nodeName.toLowerCase()] ) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
id = elem[ jQuery.expando ];
|
id = elem[ jQuery.expando ];
|
||||||
|
|
||||||
if ( id ) {
|
if ( id ) {
|
||||||
data = cache[ id ];
|
data = cache[ id ];
|
||||||
|
|
||||||
if ( data && data.events ) {
|
if ( data && data.events ) {
|
||||||
for ( var type in data.events ) {
|
for ( var type in data.events ) {
|
||||||
if ( special[ type ] ) {
|
if ( special[ type ] ) {
|
||||||
@ -578,14 +578,14 @@ jQuery.extend({
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( deleteExpando ) {
|
if ( deleteExpando ) {
|
||||||
delete elem[ jQuery.expando ];
|
delete elem[ jQuery.expando ];
|
||||||
|
|
||||||
} else if ( elem.removeAttribute ) {
|
} else if ( elem.removeAttribute ) {
|
||||||
elem.removeAttribute( jQuery.expando );
|
elem.removeAttribute( jQuery.expando );
|
||||||
}
|
}
|
||||||
|
|
||||||
delete cache[ id ];
|
delete cache[ id ];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user