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.

    <div id="foo" data-role="view">
      input
      Change status
    </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.
    /* The result can be observed in the DevTools(F12) console of the browser. */
      console.log(switchInstance.check());
      // set the checked state of the switch.
      switchInstance.check(true);
    /* The result can be observed in the DevTools(F12) console of the browser. */
      console.log(switchInstance.check());
    }
    </script>
In this article