From d1350f9f1113ef5590ec010f16da7068646aec01 Mon Sep 17 00:00:00 2001 From: Felix Nagel Date: Wed, 12 Dec 2012 16:34:56 +0100 Subject: [PATCH] Selectmenu: improve option appendTo handling in appendTo method --- ui/jquery.ui.selectmenu.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ui/jquery.ui.selectmenu.js b/ui/jquery.ui.selectmenu.js index f03a66927..bc1109918 100644 --- a/ui/jquery.ui.selectmenu.js +++ b/ui/jquery.ui.selectmenu.js @@ -401,7 +401,7 @@ $.widget( "ui.selectmenu", { this._super( key, value ); if ( key === "appendTo" ) { - this.menuWrap.appendTo( $( value || "body", this.element[ 0 ].ownerDocument )[ 0 ] ); + this.menuWrap.appendTo( this.document.find( value || "body" )[0] ); } if ( key === "disabled" ) { this.menu.menu( "option", "disabled", value );