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.

Example

  <div id="foo" data-role="view">
    <a id="backbutton" data-role="backbutton">Back</a>
    <a data-role="button" data-click="destroy">Destroy it</a>
  </div>

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

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