destroy

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

Example

<div id="foo" data-role="view">
  <a data-role="button" data-click="onClick">Button</a>
  <div data-role="footer">
    <div data-role="tabstrip">
      <a data-icon="contacts">foo</a>
      <a data-icon="contacts">bar</a>
      <a data-icon="info">baz</a>
    </div>
  </div>
</div>

<script>
var app = new kendo.mobile.Application();
function onClick() {
  var tabstrip = app.view().footer.find(".km-tabstrip").data("kendoMobileTabStrip");
  tabstrip.destroy(); //detach events
  tabstrip.wrapper.remove(); //remove DOM elements
}
</script>
In this article