mirror of
https://github.com/Hopiu/jquery-mobile.git
synced 2026-05-02 11:54:43 +00:00
use cached value in button text method
This commit is contained in:
parent
7a9b379dea
commit
e12f5122bd
1 changed files with 2 additions and 2 deletions
|
|
@ -58,10 +58,10 @@ $.widget( "mobile.selectmenu", $.mobile.widget, {
|
|||
|
||||
this.button.find( ".ui-btn-text" ).text( function() {
|
||||
if ( !self.isMultiple ) {
|
||||
return self.selected().text();
|
||||
return selected.text();
|
||||
}
|
||||
|
||||
return self.selected().length ? self.selected().map( function() {
|
||||
return selected.length ? selected.map( function() {
|
||||
return $( this ).text();
|
||||
}).get().join( ", " ) : self.placeholder;
|
||||
});
|
||||
|
|
|
|||
Loading…
Reference in a new issue