destroy

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

Example

<div id="dialog"></div>
<script>
$("#dialog").kendoDialog({
    title: "Sample Dialog",
    content: "This dialog will be destroyed"
});

var widget = $("#dialog").data("kendoDialog");

// Later, when you need to remove the widget
widget.destroy();
$("#dialog").remove(); // Remove the DOM element
</script>
In this article
destroy
Not finding the help you need?
Contact Support