destroy

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

    <div data-role="view">
      Destroy
      <ul id="actionsheet" data-role="actionsheet">
        <li>Foo</li>
        <li>Bar</li>
      </ul>
    </div>


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

    function destroy() {
      // detach events
      $("#actionsheet").data("kendoMobileActionSheet").destroy();
    }
    </script>
In this article