Text Input Options

Description

The textinput plugin has the following options:

initSelector

initSelector CSS selector string
default: "input[type='text'],  input[type='search'], 
   :jqmData(type='search'), input[type='number'],  
   :jqmData(type='number'), input[type='password'], 
   input[type='email'], input[type='url'], input[type='tel'],  textarea"

The initSelector defines the selectors that are used to trigger the automatic initialization of the widget.

All elements that are matched by the default selector will be enhanced by the textinput plugin.

To override this selector, bind to the mobileinit event and update the selector as necessary:


$(document).bind( "mobileinit", function(){
    $.mobile.textinput.prototype.options.initSelector = "...";
});

theme

theme string
default: null.  Inherited from  parent.

Sets the theme swatch color scheme for the text element. This is a letter from a to z that maps to the swatches included in your theme.

By default, all elements will inherit the same swatch color as their parent container if not explicitly set.

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

$("#text1").textinput({ theme: "a" });




















Home »
  jQuery Mobile »
    Tutorial »




jQuery_Mobile
Form
List
Layout
Theme