enable

Changes the enabled state of the widget.

Parameters

enable Boolean

Whether to enable or disable the widget.

Example

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

<script>
    var app = new kendo.mobile.Application();
    function onChange() {
        $("#foo").data("kendoMobileButton").enable(this.check());
    }
    function onClick() {
/* The result can be observed in the DevTools(F12) console of the browser. */
        console.log("click");
    }
</script>
In this article