Select Menus

Home

Select menus

The select menu plugin has the following options:

corners boolean

default: true

Applies the theme button border-radius to the select button if set to true. This option is also exposed as a data attribute: data-corners="false"

$('select').selectmenu({ corners: "false" });
icon string

default: "arrow-down"

Applies an icon from the icon set to the custom button. This option is also exposed as a data attribute: data-icon="star"

$('select').selectmenu({ icon: "star" });
iconpos string

default: "right"

Position of the icon in the select button. Possible values: left, right, none, notext. The notext value will display the select as an icon-only button with no text feedback. This option is also exposed as a data attribute: data-iconpos="left"

$('select').selectmenu({ iconpos: "left" });
iconshadow boolean

default: true

Applies the theme shadow to the select button if set to true. This option is also exposed as a data attribute: data-iconshadow="false"

$('select').selectmenu({ iconshadow: "false" });
initSelector CSS selector string

default: "select:not(:jqmData(role='slider'))"

This is used to define the selectors (element types, data roles, etc.) that will automatically be initialized as select menus. To change which elements are initialized, bind this option to the mobileinit event:

$( document ).bind( "mobileinit", function(){
	$.mobile.selectmenu.prototype.options.initSelector = ".myselect";
});
inline boolean

default: null (false)

If set to true, this will make the select button act like an inline button so the width is determined by the button's text. By default, this is null (false) so the select button is full width, regardless of the feedback content. Possible values: true, false. This option is also exposed as a data attribute: data-inline="true"

$('select').selectmenu({ inline: "true" });
nativeMenu boolean

default: true

When set to true, clicking the custom-styled select menu will open the native select menu which is best for performance. If set to false, the custom select menu style will be used instead of the native menu. This option is also exposed as a data attribute: data-native-menu="false"

$('select').selectmenu({ nativeMenu: "false" });
shadow boolean

default: true

Applies the drop shadow style to the select button if set to true. This option is also exposed as a data attribute: data-shadow="false"

$('select').selectmenu({ shadow: "false" });
theme string

default: null, inherited from parent

Sets the color scheme (swatch) for all instances of this widget. It accepts a single letter from a-z that maps to the swatches included in your theme. By default, it will inherit the same swatch color as it's parent container if not explicitly set. This option is also exposed as a data attribute: data-theme="a"

$('select').selectmenu({ theme: "a" });