destroy

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

Example

<div data-role="view">
  <a data-role="button" href="#foo" data-rel="popover">Open PopOver</a>
  <a data-role="button" data-click="destroy">Destroy</a>

  <div id="foo" data-role="popover">
    <div data-role="view">
      View 1
    </div>
  </div>
</div>

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

function destroy() {
  $("#foo").data("kendoMobilePopOver").destroy(); //detach events
}
</script>
In this article
Not finding the help you need? Improve this article