destroy

Prepares the Drawer for safe removal from DOM. Detaches all event handlers and removes jQuery.data attributes to avoid memory leaks. Calls destroy method of any child Kendo widgets.

Important: This method does not remove the Drawer element from DOM.

Example

<div data-role="view" id="drawer-settings">
    <h1>Settings</h1>
    <a data-role="button" data-click="destroyDrawer">Destroy Drawer</a>
</div>

<div data-role="drawer" id="my-drawer">
    Hi!
</div>

<script>
new kendo.mobile.Application();
function destroyDrawer() {
    $("#my-drawer").data("kendoMobileDrawer").destroy();
}
</script>
In this article
Not finding the help you need?