jquery/jquery-mobile — Issue #2801: native multiple selectmenu showing empty default text 
Author: eyuzwa
Created: 2011-10-21 17:27:21+00:00
State: open

We struggled with trying to set the default text of a native multiple selectmenu plugin to null / empty.

Eventually we came up with some updated logic to setButtonText, and would like to run this by the JQM team.

current:

return selected.length ? selected.map( function() {
return $( this ).text();
}).get().join( ", " ) : self.placeholder;

our suggestion:

var val = self.placeholder;
if(self.options.hidePlaceholderMenuItems){
val = '';
}

return selected.length ? selected.map( function() {
return $( this ).text();
}).get().join( ", " ) : val;