check

Get/Set the checked state of the widget.

Parameters

check Boolean

Whether to turn the widget on or off.

Returns

Boolean The checked state of the widget.

Example

<div id="foo" data-role="view">
  <input id="switch" type="checkbox" data-role="switch" />
  <a data-role="button" data-click="onClick">Change status</a>
</div>

<script>
var app = new kendo.mobile.Application();
function onClick() {
  // get a reference to the switch widget
  var switchInstance = $("#switch").data("kendoMobileSwitch");

  // get the checked state of the switch.
  console.log(switchInstance.check());
  // set the checked state of the switch.
  switchInstance.check(true);
  console.log(switchInstance.check());
}
</script>
In this article
Not finding the help you need?