• check (check) : Boolean
    Get/Set the checked state of the widget.

    Example

    <input data-role="switch" id="foo" />;
    
    <script>
      // get a reference to the switch widget
      var switch = $("#foo").data("kendoMobileSwitch");
    
      // get the checked state of the switch.
      var checked = switch.check();
    
      // set the checked state of the switch.
      switch.check(true);
    </script>

    Parameters

    check: Boolean
    Whether to turn the widget on or off.
    Returns
    Boolean The checked state of the widget.
  • toggle ()
    Toggle the checked state of the widget.

    Example

    <input data-role="switch" id="foo" />;
    
    <script>
      // get a reference to the switch
      var switch = $("#foo").data("kendoMobileSwitch");
    
      // toggle the checked state of the switch.
      switch.toggle();
    </script>