From ec5e7ad95ba4c6697f3e66ae93ffc86c1152aefb Mon Sep 17 00:00:00 2001 From: Richard Worth Date: Wed, 3 Feb 2010 01:22:02 +0000 Subject: resizable method destroy: put unwrapped original element in wrapper's place instead of at the end of wrapper's parent. Fixes #4940 - resizable('destroy') moves images to end of parent element --- ui/jquery.ui.resizable.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'ui') diff --git a/ui/jquery.ui.resizable.js b/ui/jquery.ui.resizable.js index e6728674b..3512b49be 100644 --- a/ui/jquery.ui.resizable.js +++ b/ui/jquery.ui.resizable.js @@ -204,7 +204,7 @@ $.widget("ui.resizable", $.ui.mouse, { if (this.elementIsWrapper) { _destroy(this.element); var wrapper = this.element; - wrapper.parent().append( + wrapper.after( this.originalElement.css({ position: wrapper.css('position'), width: wrapper.outerWidth(), @@ -212,7 +212,7 @@ $.widget("ui.resizable", $.ui.mouse, { top: wrapper.css('top'), left: wrapper.css('left') }) - ).end().remove(); + ).remove(); } this.originalElement.css('resize', this.originalResizeStyle); -- cgit v1.2.3