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.

    <div data-role="view" id="drawer-settings">
        <h1>Settings</h1>
        Destroy Drawer
    </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