destroy

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

This method does not remove the widget element from DOM.

Example

<nav id="navigation">
    <a href="#">Home</a>
    <a href="#">Products</a>
</nav>

<article>
    <button class="k-rpanel-toggle"><span class="k-icon k-i-menu"></span></button>

    Content
</article>

<script>
    $("#navigation").kendoResponsivePanel();

    var panel = $("#navigation").data("kendoResponsivePanel");

    panel.destroy();
</script>
In this article