## Properties

Name | Type | Default
--- | --- | ---
checked | Boolean | false
Sets or gets the check state.

#### Code examples

Set the `checked` property.

    $('#jqxSwitchButton').jqxSwitchButton({ checked:true });

Get the `checked` property.

    var checked = $('#jqxSwitchButton').jqxSwitchButton('checked');

Try it: checked is set to true
disabled | Boolean | false
Sets or gets whether the switch button is disabled.

#### Code examples

Set the `disabled` property.

    $('#jqxSwitchButton').jqxSwitchButton({ disabled:true });

Get the `disabled` property.

    var disabled = $('#jqxSwitchButton').jqxSwitchButton('disabled');

Try it: disabled is set to true
height | Number/String | null
Sets or gets the height.

#### Code examples

Set the `height` property .

    $('#jqxSwitchButton').jqxSwitchButton({height:"400px"});

Get the `height` property.

    var height = $('#jqxSwitchButton').jqxSwitchButton('height');

Try it: height is set to 30
orientation | String | 'horizontal'
Determines the jqxSwitchButton's orientation. Possible Values:
    'horizontal'
    'vertical'

#### Code examples

Set the `orientation` property.

    $('#jqxSwitchButton').jqxSwitchButton({ orientation:vertical });

Get the `orientation` property.

    var orientation = $('#jqxSwitchButton').jqxSwitchButton('orientation');

Try it: orientation is set to 'vertical'
onLabel | String | 'On'
Sets or gets the string displayed when the button is checked.

#### Code examples

Set the `onLabel` property.

    $('#jqxSwitchButton').jqxSwitchButton({ onLabel:'ON' });

Get the `onLabel` property.

    var onLabel = $('#jqxSwitchButton').jqxSwitchButton('onLabel');

Try it: onLabel is set to 'On'
offLabel | String | 'Off'
Sets or gets the string displayed when the button is unchecked.

#### Code examples

Set the `offLabel` property.

    $('#jqxSwitchButton').jqxSwitchButton({ offLabel:'OFF' });

Get the `offLabel` property.

    var offLabel = $('#jqxSwitchButton').jqxSwitchButton('offLabel');

Try it: offLabel is set to 'Off'
thumbSize | String | '40%'
Sets or gets the size of the thumb in percentages.

#### Code examples

Set the `thumbSize` property.

    $('#jqxSwitchButton').jqxSwitchButton({ thumbSize:'50%' });

Get the `thumbSize` property.

    var thumbSize = $('#jqxSwitchButton').jqxSwitchButton('thumbSize');

Try it: thumbSize is set to '30%'
width | Number/String | null
Sets or gets the width.

#### Code examples

Set the `width` property.

    $('#jqxSwitchButton').jqxSwitchButton({width:"200px"});

Get the `width` property.

    var width = $('#jqxSwitchButton').jqxSwitchButton('width');

Try it: width is set to 80

## Events

checked | Event |
This event is triggered when the switch button is checked.

#### Code examples

Bind to the `checked` event by type: jqxSwitchButton.

    $('#jqxSwitchButton').on('checked', function (event) { // Some code here.});

Try it: Bind to the checked event by type: jqxSwitchButton
change | Event |
This event is triggered when the switch button's state changes from one state to another.

#### Code examples

Bind to the `change` event by type: jqxSwitchButton.

    $('#jqxSwitchButton').on('change', function (event) { // Some code here.});

Try it: Bind to the change event by type: jqxSwitchButton
unchecked | Event |
This event is triggered when the switch button is unchecked.

#### Code examples

Bind to the `unchecked` event by type: jqxSwitchButton.

    $('#jqxSwitchButton').on('unchecked', function (event) { // Some code here.});

Try it: Bind to the unchecked event by type: jqxSwitchButton

## Methods

check | Method |
Checks the button.

Parameter | Type | Description
--- | --- | ---
None |  |

Return Value
None

#### Code example

Invoke the `check` method.

    $('#jqxSwitchButton').jqxSwitchButton('check');

Try it: checks the jqxSwitchButton
disable | Method |
Disables the switch button.

Parameter | Type | Description
--- | --- | ---
None |  |

Return Value
None

#### Code example

Invoke the `disable` method.

    $('#jqxSwitchButton').jqxSwitchButton('disable');

Try it: disable the jqxSwitchButton
enable | Method |
Enables the switch button.

Parameter | Type | Description
--- | --- | ---
None |  |

Return Value
None

#### Code example

Invoke the `enable` method.

    $('#jqxSwitchButton').jqxSwitchButton('enable');

Try it: enables the jqxSwitchButton
toggle | Method |
Toggles the check state. This method is automatically called when the user clicks the switch button.

Parameter | Type | Description
--- | --- | ---
None |  |

Return Value
None

#### Code example

Invoke the `toggle` method.

    $('#jqxSwitchButton').jqxSwitchButton('toggle');

Try it: toggles the jqxSwitchButton
uncheck | Method |
Unchecks the button.

Parameter | Type | Description
--- | --- | ---
None |  |

Return Value
None

#### Code example

Invoke the `uncheck` method.

    $('#jqxSwitchButton').jqxSwitchButton('uncheck');

Try it: unchecks the jqxSwitchButton
val | Method |
Sets or gets the value.

Parameter | Type | Description
--- | --- | ---
value(optional) | Boolean |

Return Value
Boolean

#### Code example

Invoke the `val` method.

// Get the value.

    var value = $("#jqxSwitchButton").jqxSwitchButton('val');

// Get the value using jQuery's val()

    var value = $("#jqxSwitchButton").val();

// Set value.

    $("#jqxSwitchButton").jqxSwitchButton('val', true);

// Set value using jQuery's val().

    $("#jqxSwitchButton").val(true);

Try it: sets the value of the jqxSwitchButton