toggle

Toggles the selected state of the ToggleButton.

Parameters

toggle Boolean

Indicates whether the ToggleButton should be selected or deselected. true and false arguments are accepted. If no argument is supplied, the ToggleButton will toggle its current state to the opposite value.

Example

<button id="button" type="button">Edit</button>

<script>
    $("#button").kendoToggleButton();
    var button = $("#button").data("kendoToggleButton");
    // select the button
    button.toggle(true);
    // deselect the button
    button.toggle(false);
    // select the button when initially deselected
    button.toggle();
</script>
In this article