git.asbjorn.biz
/
jquery.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
7a67f88
)
Tweaked the detach addition in commit [6474].
author
John Resig
<jeresig@gmail.com>
Tue, 21 Jul 2009 15:57:51 +0000
(15:57 +0000)
committer
John Resig
<jeresig@gmail.com>
Tue, 21 Jul 2009 15:57:51 +0000
(15:57 +0000)
src/manipulation.js
patch
|
blob
|
history
diff --git
a/src/manipulation.js
b/src/manipulation.js
index
1b8066f
..
dbf86a7
100644
(file)
--- a/
src/manipulation.js
+++ b/
src/manipulation.js
@@
-161,6
+161,10
@@
jQuery.fn.extend({
return this.after( value ).remove();
},
return this.after( value ).remove();
},
+ detach: function( selector ) {
+ return this.remove( selector, true );
+ },
+
domManip: function( args, table, callback ) {
var fragment, scripts, cacheable, cached, cacheresults, first,
value = args[0];
domManip: function( args, table, callback ) {
var fragment, scripts, cacheable, cached, cacheresults, first,
value = args[0];
@@
-256,14
+260,12
@@
jQuery.each({
cleanData( jQuery("*", this).add(this) );
}
cleanData( jQuery("*", this).add(this) );
}
- this.parentNode && this.parentNode.removeChild( this );
+ if ( this.parentNode ) {
+ this.parentNode.removeChild( this );
+ }
}
},
}
},
- detach: function( selector ) {
- jQuery( this ).remove( selector, true )
- },
-
empty: function() {
// Remove element nodes and prevent memory leaks
if ( this.nodeType === 1 ) {
empty: function() {
// Remove element nodes and prevent memory leaks
if ( this.nodeType === 1 ) {