From a177a926351c0ecf6cf5c7e9e2ee9d70675dcad0 Mon Sep 17 00:00:00 2001 From: Felix Nagel Date: Thu, 29 Nov 2012 20:10:05 +0100 Subject: [PATCH] Selectmenu: improve element creation --- ui/jquery.ui.selectmenu.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/ui/jquery.ui.selectmenu.js b/ui/jquery.ui.selectmenu.js index 83240a859..e187674f4 100644 --- a/ui/jquery.ui.selectmenu.js +++ b/ui/jquery.ui.selectmenu.js @@ -73,7 +73,7 @@ $.widget( "ui.selectmenu", { this.element.hide(); // create button - this.button = $( "", { + this.button = $( "", { "class": "ui-button ui-widget ui-state-default ui-corner-all", href: "#" + this.ids.id, tabindex: ( tabindex ? tabindex : this.options.disabled ? -1 : 0 ), @@ -86,18 +86,18 @@ $.widget( "ui.selectmenu", { "aria-haspopup": true }); - this.button.prepend( $( "", { + this.button.prepend( $( "", { "class": "ui-icon " + ( ( this.options.dropdown ) ? "ui-icon-triangle-1-s" : "ui-icon-triangle-2-n-s" ) })); - this.buttonText = $( "", { + this.buttonText = $( "", { "class": "ui-selectmenu-text" , html: this.element.find( "option:selected" ).text() || " " }) .appendTo( this.button ); // wrap and insert new button - this.buttonWrap = $( "", { + this.buttonWrap = $( "", { "class": "ui-selectmenu-button" }) .append( this.button ) @@ -113,14 +113,14 @@ $.widget( "ui.selectmenu", { that = this; // create menu portion, append to body - this.menu = $( "
    ", { + this.menu = $( "
      ", { "aria-hidden": true, "aria-labelledby": this.ids.button, id: this.ids.menu }); // wrap menu - this.menuWrap = $( "
      ", { + this.menuWrap = $( "
      ", { "class": "ui-selectmenu-menu", width: ( this.options.dropdown ) ? this.button.outerWidth() : this.buttonText.width() + parseFloat( this.buttonText.css( "padding-left" ) ) || 0 + parseFloat( this.buttonText.css( "margin-left") ) || 0 })