# Select Menus

Home Search

## Select menus

- Basics
- Options
- Methods
- Events

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 });

`dividerTheme` string

  default: "b"

  Sets the color scheme (swatch) for dividers in popup-based custom select menus when using the `optgroup` support. It accepts a single letter from a-z that maps to the swatches included in your theme. To set the value for all instances of this widget, bind this option to the mobileinit event:

      $( document ).on( "mobileinit", function(){
      	$.mobile.listview.prototype.options.dividerTheme = "a";
      });

  This option is also exposed as a data attribute: `data-divider-theme="a"`.

`icon` string

  default: "arrow-down"

  Replaces the default icon "arrow-down" with an icon from the icon set. This option is also exposed as a data attribute: `data-icon="star"`. Setting this attribute to "false" suppresses the icon.

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

  To suppress the icon, a boolean expression must be used:

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

`iconpos` string

  default: "right"

  Position of the icon in the select button. Possible values: left, right, top, bottom, 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 ).on( "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 });

`mini` boolean

  default: false

  Sets the size of the element to a more compact, mini version. This option is also exposed as a data attribute: `data-mini="true"`

      $('select').selectmenu({ mini: 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 });

`overlayTheme` string

  default: "a"

  Sets the color of the overlay layer for the dialog-based custom select menus and the outer border of the smaller custom menus. It accepts a single letter from a-z that maps to one of the swatches included in your theme. By default, the content block colors for swatch "a" will be used for the overlays. This option is also exposed as a data attribute: `ui-body-d`

      $('select').selectmenu({ overlayTheme: "d" });

`preventFocusZoom` boolean

  default: true on iOS platforms

  This option disables page zoom temporarily when a custom select is focused, which prevents iOS devices from zooming the page into the select. By default, iOS often zooms into form controls, and the behavior is often unnecessary and intrusive in mobile-optimized layouts. This option is also exposed as a data attribute: `data-prevent-focus-zoom="true"`

      $('select').selectmenu({ preventFocusZoom: true });

`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 one of the swatches included in your theme. By default, it will inherit the same swatch color as its parent container if not explicitly set. This option is also exposed as a data attribute: `data-theme="a"`

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

### More in this section

- Form elements
- Form basics
- Form element gallery
- Mini form element gallery
- Text inputs
- Search input
- Slider
- Flip toggle switch
- Radio buttons
- Checkboxes
- Select menus
- Theming forms
- Native form elements
- Submitting forms