destroy

Prepares the ScrollView 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 ScrollView element from DOM.

Example

<div data-role="view">
  <div id="scrollView" data-role="scrollview">
    <div data-role="page">Foo</div>
    <div data-role="page">Bar</div>
  </div>
</div>

<script>
var app = new kendo.mobile.Application();

function destroyScrollView() {
  var scrollview = $("#scrollView").data("kendoMobileScrollView");
  scrollview.destroy();
  $("#scrollView").remove();
}
</script>
In this article
Not finding the help you need?