DojoMobileSwitch widget

A Dojo mobile switch displays a rectangular widget with an embedded knob at one side or another. The position of the knob denotes one of two alternative values. The user toggles to a different value by either clicking or dragging the knob.

Fields

offText
String that is displayed on the knob, when the value of the widget is set to false. By default, the string is "Off".
onText
String that is displayed on the knob, when the value of the widget is set to true. By default, the string is "On".

Events

The onChange event fires when the user clicks or drags the knob.

Example

Use of this widget requires a statement like this:
import dojo.mobile.widgets.DojoMobileSwitch;