Make sure we use detach instead of remove in replaceWith. Fixes #5785.

This commit is contained in:
jeresig 2010-01-11 15:57:45 -05:00
parent 366039a6f0
commit 36a98b95c2
2 changed files with 11 additions and 2 deletions

View file

@ -216,7 +216,7 @@ jQuery.fn.extend({
return this.each(function() {
var next = this.nextSibling, parent = this.parentNode;
jQuery(this).remove();
jQuery(this).detach();
if ( next ) {
jQuery(next).before( value );