destroy

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

      <div id="foo" data-role="view">
        Back
        Destroy it
      </div>


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

      function destroy() {
        $("#backbutton").data("kendoMobileBackButton").destroy();
      }
      </script>
In this article