Adding in .unwrap() support, thanks to Ben Alman! Fixes #5191.

This commit is contained in:
John Resig 2009-09-25 21:41:21 +00:00
parent 70b9aed422
commit 69e6e53555
2 changed files with 39 additions and 0 deletions

View file

@ -90,6 +90,14 @@ jQuery.fn.extend({
});
},
unwrap: function() {
return this.parent().each(function(){
if ( !jQuery.nodeName( this, "body" ) ) {
jQuery( this ).replaceWith( this.childNodes );
}
}).end();
},
append: function() {
return this.domManip(arguments, true, function(elem){
if ( this.nodeType === 1 ) {