destroy
Prepares the NavBar 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 NavBar element from DOM.
<div id="foo" data-role="view" data-title="navbar demo">
<header data-role="header">
<div data-role="navbar">
a
span
a
</div>
</header>
Button
</div>
<script>
var app = new kendo.mobile.Application();
function onClick(e) {
var navbar = app.view()
.header
.find(".km-navbar")
.data("kendoMobileNavBar");
navbar.destroy();
}
</script>