@@ -107,16 +107,16 @@ $.widget( "mobile.selectmenu", $.mobile.widget, $.extend( {
107107 // TODO values buttonId and menuId are undefined here
108108 button = this . button
109109 . insertBefore ( this . select )
110- . buttonMarkup ( {
111- theme : options . theme ,
112- icon : options . icon ,
113- iconpos : iconpos ,
114- inline : inline ,
115- corners : options . corners ,
116- shadow : options . shadow ,
117- iconshadow : options . iconshadow ,
118- mini : mini
119- } ) ;
110+ . addClass ( "ui-btn ui-btn-" + ( options . theme || $ . mobile . getInheritedTheme ( this . element , "a" ) ) +
111+ ( options . icon ?
112+ ( " ui- icon ui-icon-" + options . icon + " ui-btn-icon-" + iconpos + ( options . iconshadow ?
113+ " ui-shadow-icon" :
114+ "" ) ) :
115+ "" ) +
116+ ( inline ? " ui-btn-inline" : "" ) +
117+ ( options . corners ? " ui-corner-all" : "" ) +
118+ ( options . shadow ? " ui-shadow" : "" ) +
119+ ( mini ? " ui-mini" : "" ) ) ;
120120
121121 this . setButtonText ( ) ;
122122
@@ -234,7 +234,7 @@ $.widget( "mobile.selectmenu", $.mobile.widget, $.extend( {
234234 text = this . placeholder ,
235235 span = $ ( document . createElement ( "span" ) ) ;
236236
237- this . button . find ( ".ui-btn-text" ) . html ( function ( ) {
237+ this . button . children ( ) . not ( this . element ) . remove ( ) . end ( ) . end ( ) . append ( ( function ( ) {
238238 if ( selected . length ) {
239239 text = selected . map ( function ( ) {
240240 return $ ( this ) . text ( ) ;
@@ -247,7 +247,7 @@ $.widget( "mobile.selectmenu", $.mobile.widget, $.extend( {
247247 return span . text ( text )
248248 . addClass ( self . select . attr ( "class" ) )
249249 . addClass ( selected . attr ( "class" ) ) ;
250- } ) ;
250+ } ) ( ) ) ;
251251 } ,
252252
253253 setButtonCount : function ( ) {
0 commit comments