Selectmenu: improve option appendTo handling in appendTo method

This commit is contained in:
Felix Nagel 2012-12-12 16:34:56 +01:00
parent 2845d38d40
commit d1350f9f11

View File

@ -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 );