toggle

Toggles the content visibility.

Parameters

instant Boolean optional

When set to true the expand/collapse action will be performed without animation.

Example

<div id="home" data-role="view" data-init="onInit">
    <a data-role="button" data-click="onClick">Toggle</a>
    <div id="collapsible" data-role="collapsible">
        <h2>Header</h2>
        <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit.</p>
    </div>
</div>

<script>
    var app = new kendo.mobile.Application();

    function onClick() {
        $("#collapsible").data("kendoMobileCollapsible").toggle();
    }
</script>
In this article