Slider Options
Description
The slider plugin has the following options:
disabled
disabled boolean default: false
Disables the control. The slider plugin also has enable and disable methods to dynamically enable and disable the control.
$( "#element1" ).slider({ disabled: true });
initSelector
initSelector CSS selector string default: "input[type='range'], :jqmData(type='range'), :jqmData(role='slider')"
The initSelector defines the selectors that trigger the automatic initialization of the widget plugin.
For instance, all elements that are matched by the default selector will be enhanced by the slider plugin.
To override this selector, bind to the mobileinit event and update the selector as necessary:
$( document ).bind( "mobileinit", function(){
$.mobile.slider.prototype.options.initSelector = "...";
});
theme
theme string default: null. Inherited from parent.
Sets the theme swatch color scheme for the slider. This is a letter from a to z.
By default, it will inherit the theme from its parent container.
This option is also exposed as a data attribute: data-theme="a"
.
$( "#element1" ).slider({ theme: "a" });
trackTheme
trackTheme string default: null. Inherited from parent.
Sets the theme color scheme for the track the slider slides along. This is a letter from a to z.
By default, it will inherit the color as its parent container if not explicitly set.
This option is also exposed as a data attribute: data-track-theme="a"
.
$("#element1").slider({ trackTheme: "a" });