destroy
Prepares the ScrollView for safe removal from the DOM. Detaches all event handlers and removes the jQuery.data attributes to avoid memory leaks. Calls the destroy method of any child Kendo UI widgets.
The
destroymethod does not remove theScrollViewelement from the DOM.
Example
<div id="scrollView">
<div data-role="page">Foo</div>
<div data-role="page">Bar</div>
</div>
<script>
$("#scrollView").kendoScrollView();
function destroyScrollView() {
var scrollView = $("#scrollView").data("kendoScrollView");
scrollView.destroy();
$("#scrollView").remove();
}
</script>
In this article